Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.stanford.smi.protege.ui
Class FrameRenderer  view FrameRenderer download FrameRenderer.java

java.lang.Object
  extended byDefaultRenderer
      extended byedu.stanford.smi.protege.ui.FrameRenderer
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
OwnSlotValueFrameRenderer, SlotHierarchyRenderer

public class FrameRenderer
extends DefaultRenderer
implements java.lang.Cloneable

Renderer for frames. This class has logic to render all type of frames: classes, slots, facet, simple instances. There isn't a separate renderer for each frame type because Protege's metaclass architecture is such that any list of "instances" could contain any of the above types. Since all elements of a list use the same renderer is just makes sense to stuff the code for a frame types into a single place. This class is big an clumsy though. It should probably instead delegate the rendering of each of the frame types to another instance.


Field Summary
protected  boolean _displayAbstractIcon
           
protected  boolean _displayDefaultMetaclassIcon
           
protected  boolean _displayFrameTypeIcon
           
protected  boolean _displayHiddenIcon
           
protected  boolean _displayMultipleParentsIcon
           
protected  boolean _displayType
           
protected static FrameRenderer _frameRendererPrototype
           
protected  boolean _hasLoadedIconFlags
           
protected  int _instanceCountType
           
protected static int ALL
           
protected static int DIRECT
           
protected static int NONE
           
 
Constructor Summary
FrameRenderer()
           
 
Method Summary
private  void appendType(Instance instance)
           
static FrameRenderer createInstance()
           
protected  void ensureIconFlagsLoaded()
           
protected  javax.swing.Icon getIcon(Cls cls)
           
protected  java.lang.String getInstanceCountString(Cls cls)
           
 void load(java.lang.Object value)
           
protected  void loadCls(Cls cls)
           
 void loadDuplicate(java.lang.Object value)
           
protected  void loadFacet(Facet facet)
           
protected  void loadInstance(Instance instance)
           
 void loadNull()
           
protected  void loadSlot(Slot slot)
           
 void setDisplayDirectInstanceCount(boolean b)
           
 void setDisplayFrameTypeIcon(boolean b)
           
 void setDisplayHiddenIcon(boolean b)
           
 void setDisplayInstanceCount(boolean b)
           
 void setDisplayTrailingIcons(boolean b)
           
 void setDisplayType(boolean displayType)
           
 void setMainIcon(javax.swing.Icon icon)
           
static void setPrototypeInstance(FrameRenderer renderer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

protected static final int NONE
See Also:
Constant Field Values

DIRECT

protected static final int DIRECT
See Also:
Constant Field Values

ALL

protected static final int ALL
See Also:
Constant Field Values

_instanceCountType

protected int _instanceCountType

_hasLoadedIconFlags

protected boolean _hasLoadedIconFlags

_displayFrameTypeIcon

protected boolean _displayFrameTypeIcon

_displayAbstractIcon

protected boolean _displayAbstractIcon

_displayMultipleParentsIcon

protected boolean _displayMultipleParentsIcon

_displayDefaultMetaclassIcon

protected boolean _displayDefaultMetaclassIcon

_displayHiddenIcon

protected boolean _displayHiddenIcon

_displayType

protected boolean _displayType

_frameRendererPrototype

protected static FrameRenderer _frameRendererPrototype
Constructor Detail

FrameRenderer

public FrameRenderer()
Method Detail

createInstance

public static FrameRenderer createInstance()

ensureIconFlagsLoaded

protected void ensureIconFlagsLoaded()

getInstanceCountString

protected java.lang.String getInstanceCountString(Cls cls)

setDisplayType

public void setDisplayType(boolean displayType)

loadDuplicate

public void loadDuplicate(java.lang.Object value)

load

public void load(java.lang.Object value)

getIcon

protected javax.swing.Icon getIcon(Cls cls)

loadCls

protected void loadCls(Cls cls)

loadFacet

protected void loadFacet(Facet facet)

loadInstance

protected void loadInstance(Instance instance)

loadNull

public void loadNull()

loadSlot

protected void loadSlot(Slot slot)

appendType

private void appendType(Instance instance)

setDisplayDirectInstanceCount

public void setDisplayDirectInstanceCount(boolean b)

setDisplayFrameTypeIcon

public void setDisplayFrameTypeIcon(boolean b)

setDisplayHiddenIcon

public void setDisplayHiddenIcon(boolean b)

setDisplayInstanceCount

public void setDisplayInstanceCount(boolean b)

setDisplayTrailingIcons

public void setDisplayTrailingIcons(boolean b)

setMainIcon

public void setMainIcon(javax.swing.Icon icon)

setPrototypeInstance

public static void setPrototypeInstance(FrameRenderer renderer)