org.kahina.core.visual
Class KahinaView<T extends KahinaObject>

java.lang.Object
  extended by org.kahina.core.visual.KahinaView<T>
All Implemented Interfaces:
KahinaListener
Direct Known Subclasses:
FeatureWorkbenchView, KahinaAbstractTreeView, KahinaBreakpointEditor, KahinaBreakpointProfileEditor, KahinaChartView, KahinaDAGView, KahinaDefaultView, KahinaEmptyView, KahinaGraphView, KahinaJEditSourceCodeView, KahinaProjectView, KahinaTextView, QTypeGoalView, SICStusPrologVariableBindingSetView, SWIPrologVariableBindingSetView, TestSetView, TraleSLDFeatureStructureView, TraleSLDSignatureAppropriatenessView, TraleSLDSignatureHierarchyView, TraleSLDSignatureUsageView, TraleSLDVariableBindingSetView, TulipaGrammarView

public abstract class KahinaView<T extends KahinaObject>
extends Object
implements KahinaListener


Field Summary
protected  KahinaViewConfiguration config
           
protected  KahinaInstance<?,?,?> kahina
           
protected  T model
           
 
Constructor Summary
KahinaView(KahinaInstance<?,?,?> kahina)
           
 
Method Summary
 void display(KahinaObject model)
           
protected  void doDisplay()
          Subclasses may override this method to take certain actions directly after model has changed.
 KahinaViewConfiguration getConfig()
           
 T getModel()
           
 String getTitle()
           
 boolean isVisible()
           
 Component makeEditorPanel(KahinaGUI gui)
           
abstract  JComponent makePanel()
          Returns the panel that represents this view in the GUI.
 void processEvent(KahinaEvent e)
           
protected  void processEvent(KahinaUpdateEvent e)
           
protected  void recalculate()
          Override this method to define necessary operations after changes to the model (coordinate recomputations etc.)
 void setConfig(KahinaViewConfiguration config)
           
 void setTitle(String title)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected KahinaViewConfiguration config

model

protected T extends KahinaObject model

kahina

protected final KahinaInstance<?,?,?> kahina
Constructor Detail

KahinaView

public KahinaView(KahinaInstance<?,?,?> kahina)
Method Detail

processEvent

public void processEvent(KahinaEvent e)
Specified by:
processEvent in interface KahinaListener

processEvent

protected void processEvent(KahinaUpdateEvent e)

doDisplay

protected void doDisplay()
Subclasses may override this method to take certain actions directly after model has changed. This default implementation does nothing.


display

public final void display(KahinaObject model)

getModel

public T getModel()

recalculate

protected void recalculate()
Override this method to define necessary operations after changes to the model (coordinate recomputations etc.)


makePanel

public abstract JComponent makePanel()
Returns the panel that represents this view in the GUI. This method must be invoked from the event dispatch thread.

Returns:

getTitle

public String getTitle()

setTitle

public void setTitle(String title)

setConfig

public void setConfig(KahinaViewConfiguration config)

getConfig

public KahinaViewConfiguration getConfig()

makeEditorPanel

public Component makeEditorPanel(KahinaGUI gui)

isVisible

public boolean isVisible()

setVisible

public void setVisible(boolean visible)