protected static class IltOPCImageBaseRendererFactory.BaseRenderer extends IltOPCBaseRenderer
sourceImage
(given as parameter of the constructor of
the BaseRenderer factory) according to the baseStyle
and
alarms of the object that is represented.IltOPCBaseRenderer.Clover, IltOPCBaseRenderer.Diamond, IltOPCBaseRenderer.Graphic, IltOPCBaseRenderer.Managed, IltOPCBaseRenderer.MultipleManaged, IltOPCBaseRenderer.MultipleUnmanaged, IltOPCBaseRenderer.SingleManaged, IltOPCBaseRenderer.SingleUnmanaged, IltOPCBaseRenderer.Standard, IltOPCBaseRenderer.Unmanaged
Modifier | Constructor and Description |
---|---|
protected |
BaseRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
attach(IlvGraphic base)
Attaches the BaseRenderer icon to the element base.
|
protected boolean |
containsMain(IlvPoint p,
IlvPoint tp,
IlvTransformer t,
IlvRect rect)
This implementation takes the transparency of the image into account.
|
void |
drawMain(Graphics g,
IlvTransformer t,
IlvRect rect)
Draws the main part of the base.
|
protected IltPolygon[] |
getExtraBorders(IlvRect rect)
Returns the borders of the image or
null depending
on the value returned by
IltOPCImageBaseRendererFactory.isPolygonalBorder() . |
Dimension |
getPreferredSize()
Returns the preferred size for the tiny representation.
|
void |
initResources()
Initializes resources.
|
void |
setImageFactory(ilog.tgo.graphic.renderer.internal.IltImageBaseRendererFactory factory)
Sets the image factory.
|
createBaseRendererState, isExtraBorderOutside, setPreferredSize
__isDottedBorderVisible, boundingBox, 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, getFillAngle, getFillEnd, getFillStart, getFillStyle, getFillTexture, getForeground, getPalette, getPattern, getRepresentationObject, getSelectionBorderBackground, getSelectionBorderForeground, getSelectionBorderLineStyle, getSelectionBorderWidth, getSourceImage, getView, initBaseRenderer, 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, setView
public void setImageFactory(ilog.tgo.graphic.renderer.internal.IltImageBaseRendererFactory factory)
public void initResources()
This function can be overridden in subclasses in order to initialize additional colors, patterns etc. If this method is overridden super.initResources() should be called.
initResources
in class IltBaseRenderer
public void drawMain(Graphics g, IlvTransformer t, IlvRect rect)
drawMain
in class IltBaseRenderer
g
- As in draw
t
- As in draw
rect
- As in draw
public void attach(IlvGraphic base)
attach
in class IltBaseRenderer
base
- The element base to be attached toprotected IltPolygon[] getExtraBorders(IlvRect rect)
null
depending
on the value returned by
IltOPCImageBaseRendererFactory.isPolygonalBorder()
.getExtraBorders
in class IltBaseRenderer
rect
- The rectangle defining the image dimension.IltAbstractImageBaseRendererFactory.isPolygonalBorder()
protected boolean containsMain(IlvPoint p, IlvPoint tp, IlvTransformer t, IlvRect rect)
false
for transparent pixels and true
for opaque ones.
This way when the user clicks on the transparent part of the image,
no interaction is performed.containsMain
in class IltBaseRenderer
p
- The point to be tested.tp
- The point p
transformed by t
.t
- The transformation that was applied to the image.rect
- The image area.true
if the point belongs to the image and
is opaque; otherwise returns false
.IltBaseRenderer.drawMain(java.awt.Graphics, ilog.views.IlvTransformer, ilog.views.IlvRect)
public Dimension getPreferredSize()
getPreferredSize
in class IltOPCBaseRenderer
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.