Class SwingTextBox
java.lang.Object
org.graphstream.ui.swing.renderer.shape.swing.SwingTextBox
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSwingTextBox(Font font, Color textColor, Color bgColor, boolean rounded, double padx, double pady) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.graphstream.ui.swing.renderer.shape.swing.TextBoxapply(String fontName, org.graphstream.ui.graphicGraph.stylesheet.StyleConstants.TextStyle style, int fontSize, Color textColor, Color bgColor, boolean rounded, double padx, double pady) static org.graphstream.ui.swing.renderer.shape.swing.TextBoxapply(org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.stylesheet.Style style) doubledoubledoublegetText()doublegetWidth()voidRenders the text at the given coordinates.voidChanges the text and compute its bounds.
-
Field Details
-
maxWidth
public int maxWidth
-
-
Constructor Details
-
SwingTextBox
-
-
Method Details
-
setText
Changes the text and compute its bounds. This method tries to avoid recomputing bounds if the text does not really changed. -
getText
-
getWidth
public double getWidth() -
getHeight
public double getHeight() -
getDescent
public double getDescent() -
getAscent
public double getAscent() -
render
Renders the text at the given coordinates. -
apply
public static org.graphstream.ui.swing.renderer.shape.swing.TextBox apply(org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.stylesheet.Style style) -
apply
-