gate.gui
Class NameBearerHandle

java.lang.Object
  |
  +--gate.gui.NameBearerHandle
All Implemented Interfaces:
CreoleListener, EventListener, Handle, ProgressListener, StatusListener

public class NameBearerHandle
extends Object
implements Handle, StatusListener, ProgressListener, CreoleListener

Class used to store the GUI information about an open entity (resource, controller, datastore). Such information will include icon to be used for tree components, popup menu for right click events, large and small views, etc.


Constructor Summary
NameBearerHandle(NameBearer target, Window window)
           
 
Method Summary
 void addProgressListener(ProgressListener l)
           
 void addStatusListener(StatusListener l)
           
 void datastoreClosed(CreoleEvent e)
          Called when a DataStore has been closed
 void datastoreCreated(CreoleEvent e)
          Called when a DataStore has been created
 void datastoreOpened(CreoleEvent e)
          Called when a DataStore has been opened
 Action getCloseAction()
           
 Icon getIcon()
           
 JComponent getLargeView()
          Returns the large view for this resource.
 JPopupMenu getPopup()
           
 JComponent getSmallView()
          Returns a GUI component to be used as a small viewer/editor, e.g.
 Object getTarget()
           
 String getTitle()
           
 String getTooltipText()
           
 Window getWindow()
          Returns the top level GUI component that is a parent to all other GUI components
 void processFinished()
          Called when the process is finished.
 void progressChanged(int e)
          Called when the progress has changed
 void removeProgressListener(ProgressListener l)
           
 void removeStatusListener(StatusListener l)
           
 void resourceLoaded(CreoleEvent e)
          Called when a new Resource has been loaded into the system
 void resourceRenamed(Resource resource, String oldName, String newName)
          Called when the creole register has renamed a resource.1
 void resourceUnloaded(CreoleEvent e)
          Called when a Resource has been removed from the system
 void setIcon(Icon icon)
           
 void setPopup(JPopupMenu popup)
           
 void setTitle(String newTitle)
           
 void setTooltipText(String text)
           
 void statusChanged(String e)
          Calleed when there a new status message.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameBearerHandle

public NameBearerHandle(NameBearer target,
                        Window window)
Method Detail

getIcon

public Icon getIcon()
Specified by:
getIcon in interface Handle

setIcon

public void setIcon(Icon icon)

getTitle

public String getTitle()
Specified by:
getTitle in interface Handle

setTitle

public void setTitle(String newTitle)

getSmallView

public JComponent getSmallView()
Returns a GUI component to be used as a small viewer/editor, e.g. below the main tree in the Gate GUI for the selected resource
Specified by:
getSmallView in interface Handle

getLargeView

public JComponent getLargeView()
Returns the large view for this resource. This view will go into the main display area.
Specified by:
getLargeView in interface Handle

getPopup

public JPopupMenu getPopup()
Specified by:
getPopup in interface Handle

setPopup

public void setPopup(JPopupMenu popup)

getTooltipText

public String getTooltipText()
Specified by:
getTooltipText in interface Handle

setTooltipText

public void setTooltipText(String text)

getTarget

public Object getTarget()
Specified by:
getTarget in interface Handle

getCloseAction

public Action getCloseAction()

toString

public String toString()
Overrides:
toString in class Object

removeProgressListener

public void removeProgressListener(ProgressListener l)

addProgressListener

public void addProgressListener(ProgressListener l)

removeStatusListener

public void removeStatusListener(StatusListener l)

addStatusListener

public void addStatusListener(StatusListener l)

statusChanged

public void statusChanged(String e)
Description copied from interface: StatusListener
Calleed when there a new status message.
Specified by:
statusChanged in interface StatusListener
Following copied from interface: gate.event.StatusListener
Parameters:
text -  

progressChanged

public void progressChanged(int e)
Description copied from interface: ProgressListener
Called when the progress has changed
Specified by:
progressChanged in interface ProgressListener
Following copied from interface: gate.event.ProgressListener
Parameters:
i -  

processFinished

public void processFinished()
Description copied from interface: ProgressListener
Called when the process is finished.
Specified by:
processFinished in interface ProgressListener

getWindow

public Window getWindow()
Description copied from interface: Handle
Returns the top level GUI component that is a parent to all other GUI components
Specified by:
getWindow in interface Handle

resourceLoaded

public void resourceLoaded(CreoleEvent e)
Description copied from interface: CreoleListener
Called when a new Resource has been loaded into the system
Specified by:
resourceLoaded in interface CreoleListener

resourceUnloaded

public void resourceUnloaded(CreoleEvent e)
Description copied from interface: CreoleListener
Called when a Resource has been removed from the system
Specified by:
resourceUnloaded in interface CreoleListener

resourceRenamed

public void resourceRenamed(Resource resource,
                            String oldName,
                            String newName)
Description copied from interface: CreoleListener
Called when the creole register has renamed a resource.1
Specified by:
resourceRenamed in interface CreoleListener

datastoreOpened

public void datastoreOpened(CreoleEvent e)
Description copied from interface: CreoleListener
Called when a DataStore has been opened
Specified by:
datastoreOpened in interface CreoleListener

datastoreCreated

public void datastoreCreated(CreoleEvent e)
Description copied from interface: CreoleListener
Called when a DataStore has been created
Specified by:
datastoreCreated in interface CreoleListener

datastoreClosed

public void datastoreClosed(CreoleEvent e)
Description copied from interface: CreoleListener
Called when a DataStore has been closed
Specified by:
datastoreClosed in interface CreoleListener