codeblockutil
Interface Explorer

All Known Implementing Classes:
GlassExplorer, MagicExplorer, PopupExplorer, StackExplorer, TabbedExplorer, WindowExplorer

public interface Explorer

An Explorer explores canvases. The philosophy above simplifies the relationship between the various low-level and high-level components used to display mulitple canvases in a limited space. An explorer commands a set of Canvases and tells them where to go, when to be visbilty, when to not be visible, and how they should "hide" themselves when not being used. There are many ways to achieve this UI. One way is to exmploy the "stack" loook and feel, where each canvas is stacked on top of each other. Another more common solution is the tabbed look and feel, where each canvas is a tab. Other possibilities consists of internal windows, hiding toolpane, etc. Remember, an Explorer is simply a controller of canvases. Nothing more. ANY subtype of Explorer should hold this aspect as true. Never should an Explorer be any less than an explorer of canvases.


Method Summary
 void addListener(ExplorerListener gel)
          Adds listener to the explorer
 boolean anyCanvasSelected()
          Returns whether any Canvas is currently selected
 javax.swing.JComponent getJComponent()
           
 java.lang.String getName()
           
 int getSelectedCanvasWidth()
          Returns the width of the Canvas when selected
 void reformView()
          Reforms this explorer based on the new size or location of this explorer.
 void removeListener(ExplorerListener gel)
          Removes listener from the explorer
 void selectCanvas(int index)
          Selects the canvas at the specified index.
 void setDrawersCard(java.util.List<? extends Canvas> items)
          Reassigns the set of canvases that this explorer controls.
 void setName(java.lang.String name)
          sets the name of this exlorer
 

Method Detail

getJComponent

javax.swing.JComponent getJComponent()
Returns:
JCompoent representation of this. MAY NOT BE NULL.

getName

java.lang.String getName()
Returns:
name of exlorer or null by default.

setName

void setName(java.lang.String name)
sets the name of this exlorer

Parameters:
name -

setDrawersCard

void setDrawersCard(java.util.List<? extends Canvas> items)
Reassigns the set of canvases that this explorer controls. Though the collection of canvas mnay be empty, it may not be null.

Parameters:
items -

selectCanvas

void selectCanvas(int index)
Selects the canvas at the specified index. If the index is out of bounds, perform no action.

Parameters:
index - - the index of the canvas to be viewed.

reformView

void reformView()
Reforms this explorer based on the new size or location of this explorer. For some explorers whose implementation does not depend on the size of itself, this method may trigger no action.


anyCanvasSelected

boolean anyCanvasSelected()
Returns whether any Canvas is currently selected


getSelectedCanvasWidth

int getSelectedCanvasWidth()
Returns the width of the Canvas when selected

Returns:
the width of the Canvas when selected

addListener

void addListener(ExplorerListener gel)
Adds listener to the explorer

Parameters:
gel -

removeListener

void removeListener(ExplorerListener gel)
Removes listener from the explorer

Parameters:
gel -