Class AbstractSfcGridHighlight
- java.lang.Object
-
- com.inductiveautomation.sfc.designer.workspace.AbstractSfcGridHighlight
-
- All Implemented Interfaces:
IHighlight
- Direct Known Subclasses:
ErrorHighlight
public abstract class AbstractSfcGridHighlight extends java.lang.Object implements IHighlight
-
-
Field Summary
Fields Modifier and Type Field Description protected SfcDisplayPanel
displayPanel
protected java.awt.Point
location
-
Constructor Summary
Constructors Constructor Description AbstractSfcGridHighlight(SfcDisplayPanel panel, java.awt.Point location)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Rectangle2D
getRectangle()
The outer bounding box of the highlightcom.google.common.base.Optional<java.lang.String>
getTooltip()
Return the tooltip for this highlight, if applicableboolean
isZoomed()
If this is true, the highlight's rectangle needs to be adjusted for zoom level in order to be accurate in 2d space.protected java.awt.Rectangle
location()
void
paint(DesignPanel panel, java.awt.Graphics2D g)
Paint this highlightprotected abstract void
paint(java.awt.Graphics2D g)
-
-
-
Field Detail
-
location
protected java.awt.Point location
-
displayPanel
protected SfcDisplayPanel displayPanel
-
-
Constructor Detail
-
AbstractSfcGridHighlight
public AbstractSfcGridHighlight(SfcDisplayPanel panel, java.awt.Point location)
-
-
Method Detail
-
location
protected java.awt.Rectangle location()
-
getRectangle
public java.awt.geom.Rectangle2D getRectangle()
Description copied from interface:IHighlight
The outer bounding box of the highlight- Specified by:
getRectangle
in interfaceIHighlight
-
paint
public void paint(DesignPanel panel, java.awt.Graphics2D g)
Description copied from interface:IHighlight
Paint this highlight- Specified by:
paint
in interfaceIHighlight
-
paint
protected abstract void paint(java.awt.Graphics2D g)
-
isZoomed
public boolean isZoomed()
Description copied from interface:IHighlight
If this is true, the highlight's rectangle needs to be adjusted for zoom level in order to be accurate in 2d space. Otherwise the rectangle is already in 2d space- Specified by:
isZoomed
in interfaceIHighlight
-
getTooltip
public com.google.common.base.Optional<java.lang.String> getTooltip()
Description copied from interface:IHighlight
Return the tooltip for this highlight, if applicable- Specified by:
getTooltip
in interfaceIHighlight
-
-