public static class IltNEBaseRenderer.Graphic extends IltNEBaseRenderer implements IltGraphicBaseRenderer
IlvGraphic objects.
This base renderer contains an IlvGraphic instance, which must
be set at construction time.
To use custom instances of IlvGraphic to represent your
network elements you need to:
IltBaseRendererFactory interface.IltSettings.SetValue(java.lang.Object, java.lang.Object).createValue you should:
IltNEBaseRenderer.Graphic.IlvGraphic that will represent the network
elements, along with its graphic properties. IlvGraphic as the graphic of the network element
through Graphic.setGraphic.The following example illustrates the process:
IltBaseRendererFactory factory = new IltBaseRendererFactory() {
public IltBaseRenderer createValue() {
IltNEBaseRenderer.Graphic renderer = new IltNEBaseRenderer.Graphic();
IlvGraphic g = new IlvRectangle(new IlvRect(0,0,20,10));
renderer.setGraphic(g);
return renderer;
}
};
IltSettings.SetValue("NetworkElement.Type.YOUR_NEW_TYPE_NAME.Renderer" , factory );
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.TransportShapeINVISIBLE_BASE_RENDERER| Constructor and Description |
|---|
Graphic() |
| Modifier and Type | Method and Description |
|---|---|
IlvRect |
boundingBox(IlvTransformer t,
IlvRect rect,
boolean withSelection)
Returns the bounding box of the area that
draw(g,t,rect) draws into. |
boolean |
containsMain(IlvPoint p,
IlvPoint tp,
IlvTransformer t,
IlvRect rect)
Tests whether a point lies within the main part of the base of this object.
|
void |
drawMain(Graphics g,
IlvTransformer t,
IlvRect rect)
Draws the main part of the base.
|
IlvGraphic |
getGraphic()
Returns the graphic instance that will be displayed
by this base renderer.
|
Dimension |
getPreferredSize(boolean collapsed)
Returns the preferred size for this object.
|
boolean |
isExtraBorderOutside()
Indicates whether the extra borders should be drawn inside or outside
the
rect that is used to call drawExtraBorders. |
void |
moveResize(IlvRect r)
Indicates that the underlying
IlvGraphic must be
displayed inside the given rectangle. |
void |
setGraphic(IlvGraphic g)
Sets the graphic instance that will be displayed by this base renderer.
|
createBaseRendererState, isCollapsed, setCollapsed__isDottedBorderVisible, attach, boundingBoxWithTransformer, contains, containsExtraBorders, draw, drawAlarmBorder, drawExtraBorder, drawExtraBorder, drawExtraBorders, drawSelectionBorder, dropResources, getAlarmBorderColor, getAlarmBorderWidth, getAlarmColorLevel, getBackground, getBaseRenderer, getBaseRendererState, getBorderColor, getBorderColor2, getBorderLineStyle, getBorderPalette, getBorderPattern, getBorderWidth, getBrightPalette, getDarkPalette, getDeprecatedBlinkingMode, getDetailLevel, getDottedBorderBackground, getDottedBorderForeground, getDottedBorderLineStyle, getDottedBorderPalette, getExtraBorders, getFillAngle, getFillEnd, getFillStart, getFillStyle, getFillTexture, getForeground, getPalette, getPattern, getRepresentationObject, getSelectionBorderBackground, getSelectionBorderForeground, getSelectionBorderLineStyle, getSelectionBorderWidth, getSourceImage, getView, initBaseRenderer, initResources, isAlarmBorderVisible, isAlarmColorVisible, isBaseSelectionBorderVisible, isDottedBorderVisible, isPolygonalBorder, isReliefBorders, isUsingBlinkingResources, setAlarmBorderColor, setAlarmBorderVisible, setAlarmBorderWidth, setAlarmColorLevel, setAlarmColorVisible, setBackground, setBaseRendererState, setBaseSelectionBorderVisible, setBorderColor, setBorderColor2, setBorderLineStyle, setBorderPattern, setBorderWidth, setDeprecatedBlinkingMode, setDetailLevel, setDottedBorderBackground, setDottedBorderForeground, setDottedBorderLineStyle, setDottedBorderVisible, setFillAngle, setFillEnd, setFillStart, setFillStyle, setFillTexture, setForeground, setPattern, setPolygonalBorder, setReliefBorders, setRepresentationObject, setSelectionBorderBackground, setSelectionBorderForeground, setSelectionBorderLineStyle, setSelectionBorderWidth, setSourceImage, setViewpublic final void setGraphic(IlvGraphic g)
g - Graphic object.public final IlvGraphic getGraphic()
public void moveResize(IlvRect r)
IltGraphicBaseRendererIlvGraphic must be
displayed inside the given rectangle.moveResize in interface IltGraphicBaseRendererr - Rectangle where the drawing will be performedpublic Dimension getPreferredSize(boolean collapsed)
IlvGraphic.getPreferredSize in class IltNEBaseRenderercollapsed - Indicates that the network element is collapsed.public boolean isExtraBorderOutside()
IltNEBaseRendererrect that is used to call drawExtraBorders.
This implementation returns true, as the borders of network
elements should be drawn outside.
isExtraBorderOutside in class IltNEBaseRendererpublic void drawMain(Graphics g, IlvTransformer t, IlvRect rect)
IltBaseRendererdrawMain in class IltBaseRendererg - As in draw.t - As in draw.rect - As in draw.public boolean containsMain(IlvPoint p, IlvPoint tp, IlvTransformer t, IlvRect rect)
IltBaseRenderertrue only if the point corresponds to a point
drawn by the method drawMain.
This implementation returns true if the point tp is
inside the rectangle rect, because it is assumed that the
implementation of the drawMain method fills
rect.
Note: This method may be overridden to take into account the shape drawn by this base renderer, if it is not rectangular or if it has transparency.
Note: The parameters tp and rect are given in
the same coordinate system. The transformer t has already
been applied to these parameters.
containsMain in class IltBaseRendererp - The point to be tested.tp - The point p transformed by the transformer t.t - The transformation that was applied to the object when it was
drawn.rect - As in draw.IltBaseRenderer.drawMain(java.awt.Graphics, ilog.views.IlvTransformer, ilog.views.IlvRect)public IlvRect boundingBox(IlvTransformer t, IlvRect rect, boolean withSelection)
IltBaseRendererdraw(g,t,rect) draws into.
The argument rect is a fresh copy and may be
destructively modified by this function.
This implementation of the function assumes that the main part
fills rect. Depending on the value returned by
isExtraBorderOutside(), the function returns rect, or
rect enlarged by the width of
the selection border, alarm border and dotted border, if present.
boundingBox in class IltBaseRenderert - Transformer applied to the object.rect - As in draw.withSelection - if false the rect
will not be enlarged by the selection.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.