|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.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.BoundsProvider
YLabel.calcUnionRect(java.awt.geom.Rectangle2D)
calcUnionRect
in interface YLabel.BoundsProvider
label
- the label contextr
- the bounds to updatepublic void paint(YLabel label, java.awt.Graphics2D gfx)
YLabel.Painter
YLabel.paint(java.awt.Graphics2D)
paint
in interface YLabel.Painter
label
- the label contextpublic void paintContent(YLabel label, java.awt.Graphics2D gfx, double x, double y, double width, double height)
YLabel.Painter
YLabel.paintContent(java.awt.Graphics2D, double, double, double, double)
paintContent
in interface YLabel.Painter
label
- the label contextpublic void paintBox(YLabel label, java.awt.Graphics2D gfx, double x, double y, double width, double height)
YLabel.Painter
YLabel.paintBox(java.awt.Graphics2D, double, double, double, double)
paintBox
in interface YLabel.Painter
label
- the label contextpublic OrientedRectangle getTextBox(YLabel label)
YLabel.Painter
YLabel.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.Painter
label
- the label contextpublic OrientedRectangle getIconBox(YLabel label)
YLabel.Painter
YLabel.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.Painter
label
- the label contextpublic void calculateContentSize(YLabel label, java.awt.font.FontRenderContext frc)
YLabel.Layout
YLabel.calculateSize(java.awt.font.FontRenderContext)
calculateContentSize
in interface YLabel.Layout
label
- the label contextfrc
- the font render context.public boolean contains(YLabel label, double x, double y)
YLabel.Layout
YLabel.contains(double, double)
contains
in interface YLabel.Layout
label
- 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-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |