public static class IltBTSAntennaBaseRenderer.Offscreen extends IltBTSAntennaBaseRenderer
getRect and boundingBox, which yields to
better use of hard-to-compute Shapes.
As the use of offscreen buffered image is not always supported (such as
with blinking colors or when the antenna bounding box is too big), this
renderer should also be able to render the BTS antenna directly into the
main Graphics.
Internal use only.
IltBTSAntennaBaseRenderer.Offscreen, IltBTSAntennaBaseRenderer.StandardDRAWING_THRESHOLD| Constructor and Description |
|---|
Offscreen() |
| Modifier and Type | Method and Description |
|---|---|
IlvRect |
boundingBox(IlvTransformer transf,
IlvRect rect,
boolean withSelection)
Returns the bounding box of the area that
draw(g,t,rect) draws into. |
protected boolean |
containsExtraBorders(IlvPoint p,
IlvPoint tp,
IlvTransformer t,
IlvRect rect)
Tests whether a point lies within the borders of this object.
|
protected 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.
|
protected ilog.tgo.graphic.renderer.internal.IltBaseRendererState |
createBaseRendererState()
Creates the BTS base renderer state.
|
void |
draw(Graphics grp,
IlvTransformer transf,
IlvRect rect)
Draws the entire base, such that it fits into a given rectangle.
|
protected boolean |
drawAlarmBorder(Graphics grp,
IlvTransformer transf,
IlvRect rect,
int distance)
Draw the alarm border.
|
protected void |
drawExtraBorder(Graphics grp,
IlvTransformer transf,
IlvRect rect,
IltPalette palette,
int distance,
int thickness)
Draws an extra border inside or outside the base depending
on the value returned by
isExtraBorderOutside(). |
protected void |
drawExtraBorder(Graphics grp,
Shape shape,
IltPalette palette)
Draws the extra border for a given border
Shape. |
void |
drawMain(Graphics grp,
IlvTransformer transf,
IlvRect rect)
Draws the main part of the base.
|
protected boolean |
drawSelectionBorder(Graphics grp,
IlvTransformer transf,
IlvRect rect,
int distance)
Draw the selection border.
|
float |
getAlphaBeamWidth()
Returns the alpha value used to achieve transparency effects when
drawing the antenna beam width.
|
int |
getAntennaRadius()
Returns the antenna size when the power value is maximum.
|
float |
getBeam()
Returns the beam of the antenna.
|
int |
getBeamDirection()
Returns the direction of the antenna, in degrees.
|
int |
getBeamWidth()
Returns the beam width of the antenna, in degrees.
|
int |
getBeamWidthRadius()
Returns the antenna beam width radius when the power value
is maximum.
|
float |
getPower()
Returns the power of the antenna.
|
int |
getPowerMaxValue()
Returns the maximum power possible value for the antenna.
|
IlvRect |
getRect(IlvPoint center)
Returns the preferred size of the base.
|
int |
getRotation()
Returns the antenna orientation, which is measured in degrees.
|
Shape |
getShape(IlvTransformer transf)
Returns the cached bounding shape of this element.
|
protected void |
initBaseRenderer()
Initializes the properties of this base renderer.
|
void |
initResources()
Initializes resources using the property values defined in
this base renderer.
|
boolean |
isAntennaVisible()
Returns if the antenna is visible or not.
|
boolean |
isAntialiasing()
Returns if anti-aliasing is used or not when drawing the
antenna.
|
boolean |
isBeamWidthBorderVisible()
Returns if the bean width is drawn with a border or not.
|
boolean |
isBeamWidthVisible()
Returns if the antenna beamwidth is visible or not.
|
void |
setAlarmBorderColor(Color c)
Sets the color of the alarm border, or
null if no alarm
border is to be drawn. |
void |
setAlphaBeamWidth(float v)
Sets the alpha value used to achieve transparency effects when
drawing the antenna beam width.
|
void |
setAntennaRadius(int r)
Sets the antenna size when the power value is maximum.
|
void |
setAntennaVisible(boolean v)
Sets if the antenna is visible or not.
|
void |
setAntialiasing(boolean antialiasing)
Sets if the anti-aliasing is used or not when drawing the
antenna.
|
void |
setBackground(Color bg)
Sets the background color used to display the face part.
|
void |
setBeam(float v)
Sets the beam of the antenna.
|
void |
setBeamDirection(int v)
Sets the direction of the antenna, in degrees.
|
void |
setBeamWidth(int w)
Sets the beam width of the antenna, in degrees.
|
void |
setBeamWidthBorderVisible(boolean v)
Sets if the bean width is drawn with a border or not.
|
void |
setBeamWidthRadius(int v)
Sets the antenna beam width radius when the power value
is maximum.
|
void |
setBeamWidthVisible(boolean v)
Sets if the antenna beamwidth is visible or not.
|
void |
setBorderColor(Color c)
Sets the primary color of the base border.
|
void |
setBorderColor2(Color c)
Sets the secondary color of the base border.
|
void |
setDottedBorderBackground(Color c)
Sets the background color of the dotted border, or
null if no dotted border is to be drawn. |
void |
setDottedBorderForeground(Color c)
Sets the foreground color of the dotted border, or
null if no dotted border is to be drawn. |
void |
setForeground(Color fg)
Sets the foreground color used to display the face part.
|
void |
setPower(float v)
Sets the power of the antenna.
|
void |
setPowerMaxValue(int v)
Sets the maximum power possible value for the antenna.
|
void |
setRotation(int r)
Sets the antenna orientation, which is measured in degrees.
|
void |
setSelectionBorderBackground(Color v)
Sets the background color of the selection border, or
null if no
selection border is to be drawn. |
void |
setSelectionBorderForeground(Color c)
Sets the foreground color of the selection border, or
null if no
selection border is to be drawn. |
drawExtraBorders, isExtraBorderOutside__isDottedBorderVisible, attach, boundingBoxWithTransformer, contains, drawExtraBorder, 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, isAlarmBorderVisible, isAlarmColorVisible, isBaseSelectionBorderVisible, isDottedBorderVisible, isPolygonalBorder, isReliefBorders, isUsingBlinkingResources, setAlarmBorderVisible, setAlarmBorderWidth, setAlarmColorLevel, setAlarmColorVisible, setBaseRendererState, setBaseSelectionBorderVisible, setBorderLineStyle, setBorderPattern, setBorderWidth, setDeprecatedBlinkingMode, setDetailLevel, setDottedBorderLineStyle, setDottedBorderVisible, setFillAngle, setFillEnd, setFillStart, setFillStyle, setFillTexture, setPattern, setPolygonalBorder, setReliefBorders, setRepresentationObject, setSelectionBorderLineStyle, setSelectionBorderWidth, setSourceImage, setViewprotected void initBaseRenderer()
IltBaseRendererinitBaseRenderer in class IltBaseRendererprotected ilog.tgo.graphic.renderer.internal.IltBaseRendererState createBaseRendererState()
createBaseRendererState in class IltBaseRendererpublic void setForeground(Color fg)
IltBaseRenderersetForeground in class IltBaseRendererfg - Foreground colorpublic void setBackground(Color bg)
IltBaseRenderersetBackground in class IltBaseRendererbg - background colorpublic void setBorderColor(Color c)
IltBaseRendererThe value depends on the semantic state of the object.
setBorderColor in class IltBaseRendererpublic void setBorderColor2(Color c)
IltBaseRendererThe value depends on the semantic state of the object.
setBorderColor2 in class IltBaseRendererpublic void setAlarmBorderColor(Color c)
IltBaseRenderernull if no alarm
border is to be drawn.
The value depends on the semantic state of the object.
setAlarmBorderColor in class IltBaseRendererpublic void setSelectionBorderForeground(Color c)
IltBaseRenderernull if no
selection border is to be drawn.
The value depends on the graphic object environment.
setSelectionBorderForeground in class IltBaseRendererpublic void setSelectionBorderBackground(Color v)
IltBaseRenderernull if no
selection border is to be drawn.
The value depends on the graphic object environment.
setSelectionBorderBackground in class IltBaseRendererpublic void setDottedBorderForeground(Color c)
IltBaseRenderernull if no dotted border is to be drawn.
The value depends on the graphic object environment.
setDottedBorderForeground in class IltBaseRendererpublic void setDottedBorderBackground(Color c)
IltBaseRenderernull if no dotted border is to be drawn.
The value depends on the graphic object environment.
setDottedBorderBackground in class IltBaseRendererpublic void setRotation(int r)
setRotation in class IltBTSAntennaBaseRendererpublic int getRotation()
public void setPowerMaxValue(int v)
setPowerMaxValue in class IltBTSAntennaBaseRendererpublic int getPowerMaxValue()
public void setAntennaRadius(int r)
setAntennaRadius in class IltBTSAntennaBaseRendererpublic int getAntennaRadius()
public void setBeamWidthRadius(int v)
setBeamWidthRadius in class IltBTSAntennaBaseRendererpublic int getBeamWidthRadius()
public void setPower(float v)
setPower in class IltBTSAntennaBaseRendererpublic float getPower()
public void setBeam(float v)
setBeam in class IltBTSAntennaBaseRendererpublic float getBeam()
public void setBeamDirection(int v)
setBeamDirection in class IltBTSAntennaBaseRendererpublic int getBeamDirection()
public void setBeamWidth(int w)
setBeamWidth in class IltBTSAntennaBaseRendererpublic int getBeamWidth()
public void setBeamWidthVisible(boolean v)
setBeamWidthVisible in class IltBTSAntennaBaseRendererpublic boolean isBeamWidthVisible()
public void setBeamWidthBorderVisible(boolean v)
setBeamWidthBorderVisible in class IltBTSAntennaBaseRendererpublic boolean isBeamWidthBorderVisible()
public void setAntennaVisible(boolean v)
setAntennaVisible in class IltBTSAntennaBaseRendererpublic boolean isAntennaVisible()
public void setAlphaBeamWidth(float v)
setAlphaBeamWidth in class IltBTSAntennaBaseRendererpublic float getAlphaBeamWidth()
public void setAntialiasing(boolean antialiasing)
setAntialiasing in class IltBTSAntennaBaseRendererpublic boolean isAntialiasing()
public IlvRect getRect(IlvPoint center)
IltBTSAntennaBaseRenderergetRect in class IltBTSAntennaBaseRendererpublic void initResources()
IltBaseRendererThis method can be overridden if you want to modify the value of the properties that have been automatically set by JTGO.
If this method is overridden, super.initResources()
should be called after setting your own values.
initResources in class IltBaseRendererprotected 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)protected boolean containsExtraBorders(IlvPoint p, IlvPoint tp, IlvTransformer t, IlvRect rect)
IltBaseRenderertrue only if the point corresponds to a point
drawn by the method drawExtraBorders.
This implementation returns true if the point tp is
one of the pixels drawn by the default implementation of
drawExtraBorders. It takes into account the dotted border
when drawn, and the rectangular or polygonal borders according to the
value returned by getExtraBorders.
Note: This method may be overridden to take into account particular borders drawn by a subclass.
Note: The parameters tp and rect are given in
the same coordinate system. The transformer t has already
been applied to these parameters.
containsExtraBorders 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.getExtraBorders(ilog.views.IlvRect),
IltBaseRenderer.drawExtraBorders(java.awt.Graphics, ilog.views.IlvTransformer, ilog.views.IlvRect)public Shape getShape(IlvTransformer transf)
IltBTSAntennaBaseRenderergetShape in class IltBTSAntennaBaseRenderertransf - The view transformerpublic IlvRect boundingBox(IlvTransformer transf, 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 IltBaseRenderertransf - Transformer applied to the object.rect - As in draw.withSelection - if false the rect
will not be enlarged by the selection.public void draw(Graphics grp, IlvTransformer transf, IlvRect rect)
IltBaseRendererdraw in class IltBTSAntennaBaseRenderergrp - The graphics context to draw into.transf - The transformer that has been applied to rect. (It is only
passed because drawing with an Ilt2DPalette requires it.)rect - The rectangle to draw into. This is a rectangle with
integer coordinates. Its corners have the following coordinates
x1 = rect.x,
x2 = rect.x + rect.width - 1,
y1 = rect.y,
y2 = rect.y + rect.height - 1.
The default implementation of this function calls drawMain and
drawExtraBorders.
public void drawMain(Graphics grp, IlvTransformer transf, IlvRect rect)
IltBaseRendererdrawMain in class IltBaseRenderergrp - As in draw.transf - As in draw.rect - As in draw.protected boolean drawSelectionBorder(Graphics grp, IlvTransformer transf, IlvRect rect, int distance)
IltBaseRendererdrawSelectionBorder in class IltBaseRendererprotected boolean drawAlarmBorder(Graphics grp, IlvTransformer transf, IlvRect rect, int distance)
IltBaseRendererdrawAlarmBorder in class IltBaseRendererprotected void drawExtraBorder(Graphics grp, IlvTransformer transf, IlvRect rect, IltPalette palette, int distance, int thickness)
IltBaseRendererisExtraBorderOutside().
This method is called by drawExtraBorders for each border that
needs to be drawn (selection, alarm and dotted borders).
The shape of the drawn borders is a rectangle if the dotted border
is visible OR if getExtraBorders returns null.
If the dotted border is invisible AND getExtraBorders
returns a non-null array of IltPolygon,
then these polygons are used as shapes for the borders.
drawExtraBorder in class IltBaseRenderergrp - As in drawtransf - As in drawrect - As in drawpalette - The palette with the border colorsdistance - The distance from the main part (not including width)thickness - The width of the borderIltBaseRenderer.getExtraBorders(ilog.views.IlvRect),
IltBaseRenderer.isExtraBorderOutside(),
IltBaseRenderer.isDottedBorderVisible()protected void drawExtraBorder(Graphics grp, Shape shape, IltPalette palette)
Shape.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.