public static class IltNEBaseRenderer.General extends IltNEBaseRenderer.Graphic
General
.IltNEBaseRenderer.BSC, IltNEBaseRenderer.BTS, IltNEBaseRenderer.BTSEquipment, IltNEBaseRenderer.ControlCluster, IltNEBaseRenderer.ControlComponent, IltNEBaseRenderer.ControlElement, IltNEBaseRenderer.EquipmentShape, IltNEBaseRenderer.General, IltNEBaseRenderer.Graphic, IltNEBaseRenderer.ManagementCluster, IltNEBaseRenderer.ManagementComponent, IltNEBaseRenderer.ManagementElement, IltNEBaseRenderer.MD, IltNEBaseRenderer.MSC, IltNEBaseRenderer.MuxShape, IltNEBaseRenderer.NE, IltNEBaseRenderer.NECluster, IltNEBaseRenderer.NEClusterLogical, IltNEBaseRenderer.NEComponent, IltNEBaseRenderer.NEComponentLogical, IltNEBaseRenderer.NELogical, IltNEBaseRenderer.NetworkShape, IltNEBaseRenderer.NMW, IltNEBaseRenderer.Server, IltNEBaseRenderer.StationShape, IltNEBaseRenderer.SwitchShape, IltNEBaseRenderer.TransportShape
INVISIBLE_BASE_RENDERER
Constructor and Description |
---|
General() |
Modifier and Type | Method and Description |
---|---|
Color |
getBackground()
Returns the background color of the base.
|
int |
getBorderEndCap()
Returns the end cap style of the shape border.
|
int |
getBorderLineJoin()
Returns the line join style of the shape border.
|
float |
getBorderLineStylePhase()
Returns the dash phase of the shape border.
|
float |
getBorderMiterLimit()
Returns the miter limit of the shape border.
|
Color |
getFillColor2()
Returns the second color used to compute the
gradient that fills the shape of the general node.
|
Color |
getForeground()
Returns the foreground color of the base.
|
double |
getHorizontalAutoResizeMargin() |
int |
getHorizontalAutoResizeMode() |
String |
getIcon()
Returns the icon of the general node.
|
int |
getIconPosition()
Returns the position of the icon with respect
to the label.
|
IlvGeneralNode |
getNode()
Returns the graphic object that is displayed by this base renderer,
an
IlvGeneralNode . |
Dimension |
getPreferredSize(boolean collapsed)
Returns the preferred size for this object.
|
double |
getShapeAspectRatio()
Returns the aspect ratio of the shape.
|
double |
getShapeHeight()
Returns the height of the shape.
|
int |
getShapeType()
Returns the type of shape for this general node.
|
double |
getShapeWidth()
Returns the width of the shape.
|
double |
getVerticalAutoResizeMargin() |
int |
getVerticalAutoResizeMode() |
boolean |
isKeepingAspectRatio()
Returns the flag that specifies whether the width/height
ratio is preserved by the methods
setShapeWidth(double)
and setShapeHeight(double) . |
void |
moveResize(IlvRect r)
Indicates that the underlying
IlvGraphic must be
displayed inside the given rectangle. |
void |
setBackground(Color bg)
Sets the background color of the node shape.
|
void |
setBorderColor(Color v)
Sets the color of the stroke (that is, the border) of the node shape.
|
void |
setBorderEndCap(int v)
Sets the end cap style of the shape stroke.
|
void |
setBorderLineJoin(int v)
Sets the line join style of the shape border.
|
void |
setBorderLineStyle(IltLineStyle v)
Sets the line style of the shape border.
|
void |
setBorderLineStylePhase(float v)
Sets the dash phase of the shape border.
|
void |
setBorderMiterLimit(float v)
Sets the miter limit of the shape border.
|
void |
setBorderWidth(float v)
Sets the width of the shape stroke (that is, the border).
|
void |
setFillAngle(float v)
Sets the angle (in degrees) of the gradient used to
fill the shape.
|
void |
setFillColor2(Color v)
Sets the second color used to compute the
gradient that fills the shape of the general node.
|
void |
setFillEnd(float v)
Sets the position where the gradient ends,
that is, where the color is the first
color set by
setFillColor2(java.awt.Color) . |
void |
setFillStart(float v)
Sets the position where the gradient starts.
|
void |
setFillStyle(int v)
Sets the style used to fill the shape.
|
void |
setFillTexture(Image texture)
Sets the texture used to fill
the shape of the general node.
|
void |
setForeground(Color c)
Sets the foreground color of the node shape.
|
void |
setHorizontalAutoResizeMargin(double v) |
void |
setHorizontalAutoResizeMode(int v) |
void |
setIcon(String url)
Sets the URL of the general node's icon.
|
void |
setIconPosition(int v)
Sets the position of the icon with respect
to the label.
|
void |
setKeepingAspectRatio(boolean v)
Sets the flag that specifies whether the width/height
ratio is preserved by the methods
setShapeWidth(double)
and setShapeHeight(double) . |
void |
setShapeAspectRatio(double v)
Changes the aspect ratio of the shape.
|
void |
setShapeHeight(double v)
Changes the height of the shape.
|
void |
setShapeType(int v)
Changes the type of shape for this general node.
|
void |
setShapeWidth(double v)
Changes the width of the shape.
|
void |
setVerticalAutoResizeMargin(double v) |
void |
setVerticalAutoResizeMode(int v) |
boundingBox, containsMain, drawMain, getGraphic, isExtraBorderOutside, setGraphic
createBaseRendererState, isCollapsed, setCollapsed
__isDottedBorderVisible, attach, boundingBoxWithTransformer, contains, containsExtraBorders, draw, drawAlarmBorder, drawExtraBorder, drawExtraBorder, drawExtraBorders, drawSelectionBorder, dropResources, getAlarmBorderColor, getAlarmBorderWidth, getAlarmColorLevel, getBaseRenderer, getBaseRendererState, getBorderColor, getBorderColor2, getBorderLineStyle, getBorderPalette, getBorderPattern, getBorderWidth, getBrightPalette, getDarkPalette, getDeprecatedBlinkingMode, getDetailLevel, getDottedBorderBackground, getDottedBorderForeground, getDottedBorderLineStyle, getDottedBorderPalette, getExtraBorders, getFillAngle, getFillEnd, getFillStart, getFillStyle, getFillTexture, getPalette, getPattern, getRepresentationObject, getSelectionBorderBackground, getSelectionBorderForeground, getSelectionBorderLineStyle, getSelectionBorderWidth, getSourceImage, getView, initBaseRenderer, initResources, isAlarmBorderVisible, isAlarmColorVisible, isBaseSelectionBorderVisible, isDottedBorderVisible, isPolygonalBorder, isReliefBorders, isUsingBlinkingResources, setAlarmBorderColor, setAlarmBorderVisible, setAlarmBorderWidth, setAlarmColorLevel, setAlarmColorVisible, setBaseRendererState, setBaseSelectionBorderVisible, setBorderColor2, setBorderPattern, setDeprecatedBlinkingMode, setDetailLevel, setDottedBorderBackground, setDottedBorderForeground, setDottedBorderLineStyle, setDottedBorderVisible, setPattern, setPolygonalBorder, setReliefBorders, setRepresentationObject, setSelectionBorderBackground, setSelectionBorderForeground, setSelectionBorderLineStyle, setSelectionBorderWidth, setSourceImage, setView
public void moveResize(IlvRect r)
IltGraphicBaseRenderer
IlvGraphic
must be
displayed inside the given rectangle.moveResize
in interface IltGraphicBaseRenderer
moveResize
in class IltNEBaseRenderer.Graphic
r
- Rectangle where the drawing will be performedpublic Dimension getPreferredSize(boolean collapsed)
IltNEBaseRenderer.Graphic
IlvGraphic
.getPreferredSize
in class IltNEBaseRenderer.Graphic
collapsed
- Indicates that the network element is collapsed.public final IlvGeneralNode getNode()
IlvGeneralNode
.public void setForeground(Color c)
setForeground
in class IltBaseRenderer
c
- The new foreground color.public Color getForeground()
IltBaseRenderer
The value depends on the semantic state of the object.
This function is not meant to be overridden in subclasses.
getForeground
in class IltBaseRenderer
public void setBackground(Color bg)
setBackground
in class IltBaseRenderer
bg
- The new background color.public Color getBackground()
IltBaseRenderer
The value depends on the semantic state of the object.
getBackground
in class IltBaseRenderer
public void setBorderColor(Color v)
setBorderColor
in class IltBaseRenderer
v
- The new border color.public void setBorderWidth(float v)
-1
.setBorderWidth
in class IltBaseRenderer
v
- The new stroke width.public void setBorderEndCap(int v)
The end cap style controls how the ends of the segments of the stroke will look when the stroke is dashed.
v
- The new end cap style, which must be one of:
java.awt.BasicStroke.CAP_BUTT
java.awt.BasicStroke.CAP_ROUND
java.awt.BasicStroke.CAP_SQUARE
public int getBorderEndCap()
public void setBorderLineJoin(int v)
v
- The new line join style, which must be one of:
java.awt.BasicStroke.JOIN_BEVEL
java.awt.BasicStroke.JOIN_MITER
java.awt.BasicStroke.JOIN_ROUND
public int getBorderLineJoin()
public void setBorderMiterLimit(float v)
v
- The new miter limit.public float getBorderMiterLimit()
public void setBorderLineStyle(IltLineStyle v)
setBorderLineStyle
in class IltBaseRenderer
v
- Line stylepublic void setBorderLineStylePhase(float v)
v
- A float
value that
specifies the offset from the beginning of the
stroke where the dash array pattern will start.public float getBorderLineStylePhase()
public void setFillStyle(int v)
setFillStyle
in class IltBaseRenderer
v
- The fill style, which must be one of
IlvGeneralNode.NO_FILL
,
IlvGeneralNode.SOLID_COLOR
,
IlvGeneralNode.LINEAR_GRADIENT
,
IlvGeneralNode.RADIAL_GRADIENT
, or
IlvGeneralNode.TEXTURE
.IlFillStyle
public void setFillTexture(Image texture)
setFillTexture
in class IltBaseRenderer
texture
- The URL of the image used as a texture.public void setFillColor2(Color v)
v
- The second color of the gradient.public Color getFillColor2()
public void setFillStart(float v)
The default value is 0
.
setFillStart
in class IltBaseRenderer
v
- A number between 0
and 1
.public void setFillEnd(float v)
setFillColor2(java.awt.Color)
.
The default value is 1
.
setFillEnd
in class IltBaseRenderer
v
- A number between 0
and 1
.public void setFillAngle(float v)
For a linear gradient, an angle of 0
means that
the gradient goes from left to right (that is, the first color is
on the left, and the second color on the right); an angle of
45
means that the gradient goes from the bottom
to the top, and so on.
For a radial gradient, the angle specifies the position of the
center of the gradient relative to the center of the shape. The
exact position of the center is also defined by the method
setFillStart(float)
.
Any angle between 0
and 360
can be used.
The default value is 0
.
setFillAngle
in class IltBaseRenderer
v
- An angle between 0
and 360
.public void setIcon(String url)
url
- The new icon location.public String getIcon()
public void setIconPosition(int v)
IlvDirection.Center
,
that is, if the label is inside the shape. If
the label is outside the shape, the icon is always
at the center of the shape.v
- The new label position, which is
one of the static fields of the IlvDirection
interface.public int getIconPosition()
IlvDirection
interface.setIconPosition(int)
public void setShapeType(int v)
v
- The new shape type, which must be one of:
public int getShapeType()
public void setShapeWidth(double v)
isKeepingAspectRatio()
returns true
, the height of the
shape is also modified to keep the current aspect ratio.
The center of the shape is always left unchanged.v
- The new width.public double getShapeWidth()
public void setShapeHeight(double v)
isKeepingAspectRatio()
returns true
, the width of the
shape is also modified to keep the current aspect ratio.
The center of the shape is always left unchanged.
Note that calling this method
sets the "keep aspect ratio" flag to false
.
v
- The new height.setKeepingAspectRatio(boolean)
public double getShapeHeight()
public void setShapeAspectRatio(double v)
Note that calling this method
sets the "keep aspect ratio" flag to true
.
v
- The new aspect ratio.setKeepingAspectRatio(boolean)
public double getShapeAspectRatio()
public int getHorizontalAutoResizeMode()
public void setHorizontalAutoResizeMode(int v)
public void setVerticalAutoResizeMode(int v)
public int getVerticalAutoResizeMode()
public void setHorizontalAutoResizeMargin(double v)
public double getHorizontalAutoResizeMargin()
public void setVerticalAutoResizeMargin(double v)
public double getVerticalAutoResizeMargin()
public void setKeepingAspectRatio(boolean v)
setShapeWidth(double)
and setShapeHeight(double)
. If the flag is true
,
the dimensions of the shape are controlled by calling
either setShapeWidth(double)
or setShapeHeight(double)
, and by calling
setShapeAspectRatio(double)
. If the flag is false
,
the dimensions of the shape are controlled by calling
setShapeWidth(double)
and setShapeHeight(double)
.
Note that calling setShapeHeight(double)
automatically
sets the "keep aspect ratio" flag to false
,
and that calling setShapeAspectRatio(double)
automatically
sets the flag to true
.
v
- If true
, the methods
setShapeWidth(double)
and setShapeHeight(double)
will preserve
the width/height ratio of the node shape. Otherwise,
the width and the height can be set independently.public boolean isKeepingAspectRatio()
setShapeWidth(double)
and setShapeHeight(double)
.setKeepingAspectRatio(boolean)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.