public class IlvPaletteManagerTabbedViewer extends Object implements IlvPaletteManagerViewer
getComponent()
method.
The main component used to display palettes is a JTabbedPane which adds
a tab for each palette; this tabbed pane is return by getTabbedPane()
.Constructor and Description |
---|
IlvPaletteManagerTabbedViewer(IlvPaletteManager paletteManager)
Creates the viewer for the specified palette manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addPaletteViewerListener(PaletteViewerListener l)
Adds a listener to track category or symbol selection in the viewer
|
protected void |
fireCategoryDeselected(PaletteViewerEvent evt)
Fires a
PaletteViewerEvent to the registered listeners, indicating that
a category has been deselected. |
protected void |
fireCategorySelected(PaletteViewerEvent evt)
Fires a
PaletteViewerEvent to the registered listeners, indicating that
a category has been selected. |
protected void |
fireSymbolDeselected(PaletteViewerEvent evt)
Fire a
PaletteViewerEvent to the registered listeners, indicating that
a symbol has been deselected. |
protected void |
fireSymbolSelected(PaletteViewerEvent evt)
Fire a
PaletteViewerEvent to the registered listeners, indicating that
a symbol has been selected. |
JComponent |
getComponent()
Returns the main component of the viewer.
|
IlvPaletteManager |
getPaletteManager()
Returns the palette manager associated with this viewer.
|
IlvPalette |
getSelectedPalette()
Returns the current selected palette
|
IlvPaletteSymbol |
getSelectedSymbol()
Returns the current selected symbol
|
JTabbedPane |
getTabbedPane()
Returns the JTabbedPane component used in this viewer to display
the palette tree viewers.
|
boolean |
isClosable(IlvPalette palette)
Returns whether the tab corresponding to the specified palette can be closed by some user action
|
boolean |
isEditable()
Indicates if this viewer is editable or not.
|
void |
removePaletteViewerListener(PaletteViewerListener l)
Removes a listener used to track category or symbol selection in the viewer
|
void |
select(IlvPalette palette)
Selects a palette in the viewer.
|
void |
select(IlvPaletteSymbol symbol)
Select a symbol in the symbol viewer.
|
void |
setClosable(IlvPalette palette,
boolean closable)
Sets whether the tab corresponding to the specified palette can be closed by some user action.
|
void |
setEditable(boolean editable)
Indicates if this viewer should be editable, it means that symbols and categories can be added, removed, moved
by drag and drop.
|
void |
setPaletteManager(IlvPaletteManager paletteManager)
Sets the new palette manager for this viewer.
|
void |
setSearchToolVisisble(boolean visible)
Sets the visibility of the search tool
|
public IlvPaletteManagerTabbedViewer(IlvPaletteManager paletteManager)
paletteManager
- The palette manager that will be used to get palettes to displaypublic void addPaletteViewerListener(PaletteViewerListener l)
addPaletteViewerListener
in interface IlvPaletteManagerViewer
l
- The listener to addpublic void removePaletteViewerListener(PaletteViewerListener l)
removePaletteViewerListener
in interface IlvPaletteManagerViewer
l
- The listener to removeprotected void fireCategorySelected(PaletteViewerEvent evt)
PaletteViewerEvent
to the registered listeners, indicating that
a category has been selected.protected void fireCategoryDeselected(PaletteViewerEvent evt)
PaletteViewerEvent
to the registered listeners, indicating that
a category has been deselected.protected void fireSymbolSelected(PaletteViewerEvent evt)
PaletteViewerEvent
to the registered listeners, indicating that
a symbol has been selected.protected void fireSymbolDeselected(PaletteViewerEvent evt)
PaletteViewerEvent
to the registered listeners, indicating that
a symbol has been deselected.public JComponent getComponent()
getTabbedPane
getComponent
in interface IlvPaletteManagerViewer
getTabbedPane()
public IlvPaletteManager getPaletteManager()
getPaletteManager
in interface IlvPaletteManagerViewer
public JTabbedPane getTabbedPane()
public void setPaletteManager(IlvPaletteManager paletteManager)
setPaletteManager
in interface IlvPaletteManagerViewer
paletteManager
- The new current palette manager.public void select(IlvPaletteSymbol symbol)
select
in interface IlvPaletteManagerViewer
symbol
- The symbol to selectpublic IlvPalette getSelectedPalette()
getSelectedPalette
in interface IlvPaletteManagerViewer
public IlvPaletteSymbol getSelectedSymbol()
getSelectedSymbol
in interface IlvPaletteManagerViewer
public void select(IlvPalette palette)
select
in interface IlvPaletteManagerViewer
palette
- The palette to selectpublic void setSearchToolVisisble(boolean visible)
visible
- true to enabled visibilitypublic void setClosable(IlvPalette palette, boolean closable)
palette
- The paletteclosable
- a boolean value, where true means the tab can be closedpublic boolean isClosable(IlvPalette palette)
palette
- The palettepublic boolean isEditable()
public void setEditable(boolean editable)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.