net.sourceforge.toscanaj.view.diagram
Class ObjectLabelView

java.lang.Object
  extended byorg.tockit.canvas.CanvasItem
      extended bynet.sourceforge.toscanaj.view.diagram.LabelView
          extended bynet.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

Nested Class Summary
 
Nested classes inherited from class net.sourceforge.toscanaj.view.diagram.LabelView
LabelView.DragMode, LabelView.LabelFactory
 
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
 
Constructor Summary
protected ObjectLabelView(DiagramView diagramView, NodeView nodeView, LabelInfo label)
          Creates a view for the given label information.
 
Method Summary
static boolean allAreHidden()
           
protected  void doQuery()
           
static Query getDefaultQuery()
           
 java.lang.Object getEntryAt(int position)
           
static LabelView.LabelFactory getFactory()
           
 int getNumberOfEntries()
           
 FCAElement getObjectAtPosition(java.awt.geom.Point2D position)
           
protected  int getPlacement()
          Returns LabelView.BELOW
 Query getQuery()
           
protected  boolean highlightedInFilter()
           
protected  boolean highlightedInIdeal()
           
protected  boolean isFaded()
           
 boolean isVisible()
          Avoids drawing object labels for non-realised concepts.
static void setAllHidden(boolean allHidden)
           
static void setDefaultQuery(Query query)
          Sets the default query for new labels.
 void setQuery(Query query)
           
 void updateEntries()
           
 
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
 

Field Detail

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
Constructor Detail

ObjectLabelView

protected ObjectLabelView(DiagramView diagramView,
                          NodeView nodeView,
                          LabelInfo label)
Creates a view for the given label information.

Method Detail

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