net.sourceforge.toscanaj.view.diagram
Class ObjectLabelView
java.lang.Object
org.tockit.canvas.CanvasItem
net.sourceforge.toscanaj.view.diagram.LabelView
net.sourceforge.toscanaj.view.diagram.ObjectLabelView
- All Implemented Interfaces:
- ChangeObserver, org.tockit.events.EventBrokerListener
- public class ObjectLabelView
- extends LabelView
A LabelView for displaying the objects.
This and the AttributeLabelView are used to distinguish between labels above
and below the nodes and the default display type (list or number).
- See Also:
AttributeLabelView
Field Summary |
protected static boolean |
allHidden
|
Fields inherited from class net.sourceforge.toscanaj.view.diagram.LabelView |
ABOVE, BELOW, DEFAULT_DISPLAY_LINES, diagramView, displayLines, dragMode, firstItem, labelInfo, lineHeight, MIN_DISPLAY_LINES, MOVING, nodeView, NOT_DRAGGING, observers, rect, RESIZING, scrollbarShown, SCROLLING |
Methods inherited from class net.sourceforge.toscanaj.view.diagram.LabelView |
addObserver, containsPoint, draw, getCanvasBounds, getConnectorColor, getConnectorEndPosition, getFont, getIndexOfPosition, getLabelHeight, getLabelWidth, getNodeView, getPosition, notifyObservers, processClickEvent, processDragEvent, processEvent, setFont, setScrollbarShown, startDrag, update, updateBounds |
Methods inherited from class org.tockit.canvas.CanvasItem |
hasAutoRaise |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
allHidden
protected static boolean allHidden
- To do:
- this is a quick hack to get a hide all feature, should be changed
to some controller object or similar
ObjectLabelView
protected ObjectLabelView(DiagramView diagramView,
NodeView nodeView,
LabelInfo label)
- Creates a view for the given label information.
setAllHidden
public static void setAllHidden(boolean allHidden)
allAreHidden
public static boolean allAreHidden()
getFactory
public static LabelView.LabelFactory getFactory()
isVisible
public boolean isVisible()
- Avoids drawing object labels for non-realised concepts.
- Overrides:
isVisible
in class LabelView
updateEntries
public void updateEntries()
- Overrides:
updateEntries
in class LabelView
setDefaultQuery
public static void setDefaultQuery(Query query)
- Sets the default query for new labels.
getDefaultQuery
public static Query getDefaultQuery()
getPlacement
protected int getPlacement()
- Returns LabelView.BELOW
- Specified by:
getPlacement
in class LabelView
setQuery
public void setQuery(Query query)
getNumberOfEntries
public int getNumberOfEntries()
- Specified by:
getNumberOfEntries
in class LabelView
getEntryAt
public java.lang.Object getEntryAt(int position)
- Specified by:
getEntryAt
in class LabelView
doQuery
protected void doQuery()
getObjectAtPosition
public FCAElement getObjectAtPosition(java.awt.geom.Point2D position)
highlightedInIdeal
protected boolean highlightedInIdeal()
- Specified by:
highlightedInIdeal
in class LabelView
highlightedInFilter
protected boolean highlightedInFilter()
- Specified by:
highlightedInFilter
in class LabelView
getQuery
public Query getQuery()
isFaded
protected boolean isFaded()
- Specified by:
isFaded
in class LabelView
The ToscanaJ project