|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.DefaultLabelConfiguration
public class DefaultLabelConfiguration
Helper class for use in configuration implementations
that can be used in YLabel.Factory.addConfiguration(String, java.util.Map) to serve
as a basic implementation.
This implementation mimics the default behavior of a YLabel instance.
![]() |
![]() |
| Constructor Summary | |
|---|---|
DefaultLabelConfiguration()
|
|
| Method Summary | |
|---|---|
void |
calculateContentSize(YLabel label,
java.awt.font.FontRenderContext frc)
Delegating method of YLabel.calculateSize(java.awt.font.FontRenderContext) |
void |
calcUnionRect(YLabel label,
java.awt.geom.Rectangle2D r)
Delegating method of YLabel.calcUnionRect(java.awt.geom.Rectangle2D) |
boolean |
contains(YLabel label,
double x,
double y)
Delegating method of YLabel.contains(double, double) |
OrientedRectangle |
getIconBox(YLabel label)
Delegating method of YLabel.getIconBox(). |
OrientedRectangle |
getTextBox(YLabel label)
Delegating method of YLabel.getTextBox(). |
boolean |
isAutoFlippingEnabled()
Determines whether or not this painter should automatically flip label content depending on the label's rotation angle. |
void |
paint(YLabel label,
java.awt.Graphics2D gfx)
Delegating method of YLabel.paint(java.awt.Graphics2D) |
void |
paintBox(YLabel label,
java.awt.Graphics2D gfx,
double x,
double y,
double width,
double height)
Delegating method of YLabel.paintBox(java.awt.Graphics2D, double, double, double, double) |
void |
paintContent(YLabel label,
java.awt.Graphics2D gfx,
double x,
double y,
double width,
double height)
Delegating method of YLabel.paintContent(java.awt.Graphics2D, double, double, double, double) |
void |
setAutoFlippingEnabled(boolean enabled)
Specifies whether or not this painter should automatically flip label content depending on the label's rotation angle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLabelConfiguration()
| Method Detail |
|---|
public void calcUnionRect(YLabel label,
java.awt.geom.Rectangle2D r)
YLabel.BoundsProviderYLabel.calcUnionRect(java.awt.geom.Rectangle2D)
calcUnionRect in interface YLabel.BoundsProviderlabel - the label contextr - the bounds to update
public void paint(YLabel label,
java.awt.Graphics2D gfx)
YLabel.PainterYLabel.paint(java.awt.Graphics2D)
paint in interface YLabel.Painterlabel - the label context
public void paintContent(YLabel label,
java.awt.Graphics2D gfx,
double x,
double y,
double width,
double height)
YLabel.PainterYLabel.paintContent(java.awt.Graphics2D, double, double, double, double)
paintContent in interface YLabel.Painterlabel - the label context
public void paintBox(YLabel label,
java.awt.Graphics2D gfx,
double x,
double y,
double width,
double height)
YLabel.PainterYLabel.paintBox(java.awt.Graphics2D, double, double, double, double)
paintBox in interface YLabel.Painterlabel - the label contextpublic OrientedRectangle getTextBox(YLabel label)
YLabel.PainterYLabel.getTextBox().
Note: This method is not used to calculate the text placement in the painter, but rather provides a means to query the painter for text position and orientation.
getTextBox in interface YLabel.Painterlabel - the label contextpublic OrientedRectangle getIconBox(YLabel label)
YLabel.PainterYLabel.getIconBox().
Note: This method is not used to calculate the icon placement in the painter, but rather provides a means to query the painter for icon position and orientation.
getIconBox in interface YLabel.Painterlabel - the label context
public void calculateContentSize(YLabel label,
java.awt.font.FontRenderContext frc)
YLabel.LayoutYLabel.calculateSize(java.awt.font.FontRenderContext)
calculateContentSize in interface YLabel.Layoutlabel - the label contextfrc - the font render context.
public boolean contains(YLabel label,
double x,
double y)
YLabel.LayoutYLabel.contains(double, double)
contains in interface YLabel.Layoutlabel - the label context.public boolean isAutoFlippingEnabled()
By default, this property is set to false.
true if this painter automatically flips label
content depending on the label's rotation angle and false
otherwise.setAutoFlippingEnabled(boolean)public void setAutoFlippingEnabled(boolean enabled)
By default, this property is set to false.
enabled - if true, this painter will automatically flip
label content depending on the label's rotation angle.isAutoFlippingEnabled()
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||