<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">java.lang.Object</A>
<IMGSRC="../../../resources/inherit.gif"ALT="extended by "><B>com.mxgraph.util.mxStyleUtils</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>mxStyleUtils</B><DT>extends <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
Contains various style helper methods for use with mxGraph.
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#addStylename(java.lang.String, java.lang.String)">addStylename</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> stylename)</CODE>
<BR>
Adds the specified stylename to the given style if it does not already
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#getStylename(java.lang.String)">getStylename</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style)</CODE>
<BR>
Returns the stylename in a style of the form stylename[;key=value] or an
empty string if the given style does not contain a stylename.</TD>
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#getStylenames(java.lang.String)">getStylenames</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style)</CODE>
<BR>
Returns the stylenames in a style of the form stylename[;key=value] or an
empty array if the given style does not contain any stylenames.</TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#indexOfStylename(java.lang.String, java.lang.String)">indexOfStylename</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> stylename)</CODE>
<BR>
Returns the index of the given stylename in the given style.</TD>
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#removeAllStylenames(java.lang.String)">removeAllStylenames</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style)</CODE>
<BR>
Removes all stylenames from the given style and returns the updated
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#removeStylename(java.lang.String, java.lang.String)">removeStylename</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> stylename)</CODE>
<BR>
Removes all occurrences of the specified stylename in the given style and
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#setCellStyleFlags(com.mxgraph.model.mxIGraphModel, java.lang.Object[], java.lang.String, int, java.lang.Boolean)">setCellStyleFlags</A></B>(<AHREF="../../../com/mxgraph/model/mxIGraphModel.html"title="interface in com.mxgraph.model">mxIGraphModel</A> model,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[] cells,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> key,
int flag,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Boolean.html?is-external=true"title="class or interface in java.lang">Boolean</A> value)</CODE>
<BR>
Sets or toggles the flag bit for the given key in the cell's styles.</TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#setCellStyles(com.mxgraph.model.mxIGraphModel, java.lang.Object[], java.lang.String, java.lang.String)">setCellStyles</A></B>(<AHREF="../../../com/mxgraph/model/mxIGraphModel.html"title="interface in com.mxgraph.model">mxIGraphModel</A> model,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[] cells,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> key,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> value)</CODE>
<BR>
Assigns the value for the given key in the styles of the given cells, or
removes the key from the styles if the value is null.</TD>
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#setStyle(java.lang.String, java.lang.String, java.lang.String)">setStyle</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> key,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> value)</CODE>
<BR>
Adds or removes the given key, value pair to the style and returns the
<CODE>static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/util/mxStyleUtils.html#setStyleFlag(java.lang.String, java.lang.String, int, java.lang.Boolean)">setStyleFlag</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> key,
int flag,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Boolean.html?is-external=true"title="class or interface in java.lang">Boolean</A> value)</CODE>
<BR>
Sets or removes the given key from the specified style and returns the
<THALIGN="left"><B>Methods inherited from class java.lang.<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TRBGCOLOR="white"CLASS="TableRowColor">
<TD><CODE><AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()"title="class or interface in java.lang">clone</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)"title="class or interface in java.lang">equals</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()"title="class or interface in java.lang">finalize</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()"title="class or interface in java.lang">getClass</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()"title="class or interface in java.lang">hashCode</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()"title="class or interface in java.lang">notify</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()"title="class or interface in java.lang">notifyAll</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()"title="class or interface in java.lang">toString</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()"title="class or interface in java.lang">wait</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)"title="class or interface in java.lang">wait</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)"title="class or interface in java.lang">wait</A></CODE></TD>
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>getStylename</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style)</PRE>
<DL>
<DD>Returns the stylename in a style of the form stylename[;key=value] or an
empty string if the given style does not contain a stylename.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>style</CODE> - String of the form stylename[;key=value].
<DT><B>Returns:</B><DD>Returns the stylename from the given formatted string.</DL>
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A>[] <B>getStylenames</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style)</PRE>
<DL>
<DD>Returns the stylenames in a style of the form stylename[;key=value] or an
empty array if the given style does not contain any stylenames.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>style</CODE> - String of the form stylename[;stylename][;key=value].
<DT><B>Returns:</B><DD>Returns the stylename from the given formatted string.</DL>
public static int <B>indexOfStylename</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> stylename)</PRE>
<DL>
<DD>Returns the index of the given stylename in the given style. This returns
-1 if the given stylename does not occur (as a stylename) in the given
style, otherwise it returns the index of the first character.
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>addStylename</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> stylename)</PRE>
<DL>
<DD>Adds the specified stylename to the given style if it does not already
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>removeStylename</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> stylename)</PRE>
<DL>
<DD>Removes all occurrences of the specified stylename in the given style and
returns the updated style. Trailing semicolons are preserved.
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>removeAllStylenames</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style)</PRE>
<DL>
<DD>Removes all stylenames from the given style and returns the updated
public static void <B>setCellStyles</B>(<AHREF="../../../com/mxgraph/model/mxIGraphModel.html"title="interface in com.mxgraph.model">mxIGraphModel</A> model,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[] cells,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> key,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> value)</PRE>
<DL>
<DD>Assigns the value for the given key in the styles of the given cells, or
removes the key from the styles if the value is null.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>model</CODE> - Model to execute the transaction in.<DD><CODE>cells</CODE> - Array of cells to be updated.<DD><CODE>key</CODE> - Key of the style to be changed.<DD><CODE>value</CODE> - New value for the given key.</DL>
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>setStyle</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> key,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> value)</PRE>
<DL>
<DD>Adds or removes the given key, value pair to the style and returns the
new style. If value is null or zero length then the key is removed from
the style.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>style</CODE> - String of the form <code>stylename[;key=value]</code>.<DD><CODE>key</CODE> - Key of the style to be changed.<DD><CODE>value</CODE> - New value for the given key.
<DT><B>Returns:</B><DD>Returns the new style.</DL>
public static void <B>setCellStyleFlags</B>(<AHREF="../../../com/mxgraph/model/mxIGraphModel.html"title="interface in com.mxgraph.model">mxIGraphModel</A> model,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A>[] cells,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> key,
int flag,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Boolean.html?is-external=true"title="class or interface in java.lang">Boolean</A> value)</PRE>
<DL>
<DD>Sets or toggles the flag bit for the given key in the cell's styles. If
value is null then the flag is toggled.
<code>
mxUtils.setCellStyleFlags(graph.getModel(),
cells,
mxConstants.STYLE_FONTSTYLE,
mxConstants.FONT_BOLD, null);
</code>
Toggles the bold font style.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>model</CODE> - Model that contains the cells.<DD><CODE>cells</CODE> - Array of cells to change the style for.<DD><CODE>key</CODE> - Key of the style to be changed.<DD><CODE>flag</CODE> - Integer for the bit to be changed.<DD><CODE>value</CODE> - Optional boolean value for the flag.</DL>
public static <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>setStyleFlag</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> style,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> key,
int flag,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Boolean.html?is-external=true"title="class or interface in java.lang">Boolean</A> value)</PRE>
<DL>
<DD>Sets or removes the given key from the specified style and returns the
new style. If value is null then the flag is toggled.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>style</CODE> - String of the form stylename[;key=value].<DD><CODE>key</CODE> - Key of the style to be changed.<DD><CODE>flag</CODE> - Integer for the bit to be changed.<DD><CODE>value</CODE> - Optional boolean value for the given flag.</DL>