## 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.

Inner Class Summary
`(package private) class` `NameBearerHandle.CloseAction`
`(package private) class` `NameBearerHandle.DumpToFileAction`
`(package private) class` `NameBearerHandle.PopulateCorpusAction`
`(package private) class` `NameBearerHandle.ProxyStatusListener`
`(package private) class` `NameBearerHandle.ReloadAction`
`(package private) class` `NameBearerHandle.ReloadClassAction` Saves a corpus as a set of xml files in a directory.
`(package private) class` `NameBearerHandle.RenameAction`
`(package private) class` `NameBearerHandle.SaveAction`
`(package private) class` `NameBearerHandle.SaveAsXmlAction` Used to save a document as XML
`(package private) class` `NameBearerHandle.SaveCorpusAsXmlAction` Saves a corpus as a set of xml files in a directory.
`(package private) class` `NameBearerHandle.SaveToAction`

Field Summary
`(package private) CorpusFillerComponent` `corpusFiller` Component used to select the options for corpus populating
`(package private) Icon` `icon`
`(package private) JComponent` `largeView`
`(package private) JPopupMenu` `popup`
`private Vector` `progressListeners`
`(package private) ResourceData` `rData`
`(package private) StatusListener` `sListenerProxy`
`(package private) JComponent` `smallView`
`private Vector` `statusListeners`
`(package private) NameBearer` `target`
`(package private) String` `title`
`(package private) String` `tooltipText`
`(package private) Window` `window` The top level GUI component this hadle belongs to.

Constructor Summary
`NameBearerHandle(NameBearer target, Window window)`

Method Summary
`void` `addProgressListener(ProgressListener l)`
`void` `addStatusListener(StatusListener l)`
`protected void` `buildViews()`
`protected void` `cleanup()` Releases the memory, removes the listeners, cleans up.
`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
`protected void` `fireProcessFinished()`
`protected void` `fireProgressChanged(int e)`
`protected void` `fireStatusChanged(String e)`
`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` `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
`<clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait`

Field Detail

### popup

    JPopupMenu popup

### title

    String title

### tooltipText

    String tooltipText

### target

    NameBearer target

### window

    Window window

  The top level GUI component this hadle belongs to.

### rData

    ResourceData rData

### icon

    Icon icon

### smallView

    JComponent smallView

### largeView

    JComponent largeView

### corpusFiller

    CorpusFillerComponent corpusFiller

  Component used to select the options for corpus populating

### sListenerProxy

    StatusListener sListenerProxy

### progressListeners

    private transient Vector progressListeners

### statusListeners

    private transient Vector statusListeners

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()

### buildViews

    protected void buildViews()

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### removeProgressListener

    public void removeProgressListener(ProgressListener l)

### addProgressListener

    public void addProgressListener(ProgressListener l)

### cleanup

    protected void cleanup()

  Releases the memory, removes the listeners, cleans up. Will get called when the target resource is unloaded from the system

### fireProgressChanged

    protected void fireProgressChanged(int e)

### fireProcessFinished

    protected void fireProcessFinished()

### removeStatusListener

    public void removeStatusListener(StatusListener l)

### addStatusListener

    public void addStatusListener(StatusListener l)

### fireStatusChanged

    protected void fireStatusChanged(String e)

### 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`

### 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`