|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
bibliothek.extension.gui.dock.theme.eclipse.EclipseStackDockComponent
public class EclipseStackDockComponent
A StackDockComponent
, based on a RexTabbedComponent
, which looks like eclipse.
Partly copied from DefaultStackDockComponent
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
EclipseStackDockComponent(EclipseTheme theme,
DockStation station)
|
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener listener)
Adds a ChangeListener to this component. |
void |
addTab(String title,
Icon icon,
Component comp,
Dockable dockable)
Adds a new child at an unspecified location. |
Rectangle |
getBoundsAt(int index)
Gets the location and size of the graphical element that allows the user to select the index 'th child. |
Component |
getComponent()
Gets a Component on which the children of this
StackDockComponent will be displayed. |
DockController |
getController()
Gets the controller that is currently used. |
Dockable |
getDockable(int index)
|
int |
getSelectedIndex()
Gets the index of the currently selected component |
int |
getTabCount()
Gets the number of children that are added to this StackDockComponent. |
EclipseTabbedComponent |
getTabs()
Gets the component onto which this StackDockComponent
puts its children. |
boolean |
hasBorder()
Whether this kind of component already has a border. |
void |
insertTab(String title,
Icon icon,
Component comp,
Dockable dockable,
int index)
Adds a new child at the location index . |
void |
remove(int index)
Removes the child at location index . |
void |
removeAll()
Removes all children from this component |
void |
removeChangeListener(ChangeListener listener)
Removes a ChangeListener which was added earlier. |
void |
setController(DockController controller)
Sets the controller for which this component manages its children. |
void |
setIconAt(int index,
Icon newIcon)
Sets the icon of the child at location index . |
void |
setSelectedIndex(int index)
Selects the component at location index . |
void |
setTitleAt(int index,
String newTitle)
Sets the title of the child at location index . |
void |
setTooltipAt(int index,
String newTooltip)
Sets the tooltip of the child at location index . |
void |
tabChanged(Dockable t)
|
void |
tabRemoved(Dockable t)
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EclipseStackDockComponent(EclipseTheme theme, DockStation station)
Method Detail |
---|
public EclipseTabbedComponent getTabs()
StackDockComponent
puts its children.
public void removeAll()
StackDockComponent
removeAll
in interface StackDockComponent
removeAll
in class Container
public void remove(int index)
StackDockComponent
index
.
remove
in interface StackDockComponent
remove
in class Container
index
- the index of the childpublic void tabRemoved(Dockable t)
tabRemoved
in interface TabListener
public void tabChanged(Dockable t)
tabChanged
in interface TabListener
public void addChangeListener(ChangeListener listener)
StackDockComponent
ChangeListener
to this component. The listener will be
called when the selected component changes.
addChangeListener
in interface StackDockComponent
listener
- the new listenerpublic void removeChangeListener(ChangeListener listener)
StackDockComponent
ChangeListener
which was added earlier.
removeChangeListener
in interface StackDockComponent
listener
- the listener to removepublic int getSelectedIndex()
StackDockComponent
getSelectedIndex
in interface StackDockComponent
public void setSelectedIndex(int index)
StackDockComponent
index
.
setSelectedIndex
in interface StackDockComponent
index
- the index of the selected componentpublic Rectangle getBoundsAt(int index)
StackDockComponent
index
'th child.
getBoundsAt
in interface StackDockComponent
index
- the index of the child
public void addTab(String title, Icon icon, Component comp, Dockable dockable)
StackDockComponent
addTab
in interface StackDockComponent
title
- the title of the childicon
- an icon to display for the child or null
comp
- the new child to displaydockable
- the Dockable for which the tab is usedpublic void insertTab(String title, Icon icon, Component comp, Dockable dockable, int index)
StackDockComponent
index
.
insertTab
in interface StackDockComponent
title
- the title of the childicon
- an icon to display for the child or null
comp
- the new child to displaydockable
- the Dockable for which the tab is usedindex
- the index that the new child should havepublic Dockable getDockable(int index)
public int getTabCount()
StackDockComponent
getTabCount
in interface StackDockComponent
public void setTitleAt(int index, String newTitle)
StackDockComponent
index
.
setTitleAt
in interface StackDockComponent
index
- the index of the childnewTitle
- the new titlepublic void setIconAt(int index, Icon newIcon)
StackDockComponent
index
.
setIconAt
in interface StackDockComponent
index
- the index of the childnewIcon
- the new icon, null
if no icon
should be displayedpublic void setTooltipAt(int index, String newTooltip)
StackDockComponent
index
.
setTooltipAt
in interface StackDockComponent
index
- the index of the childnewTooltip
- the new tooltip, can be null
public Component getComponent()
StackDockComponent
Component
on which the children of this
StackDockComponent
will be displayed.
getComponent
in interface StackDockComponent
Component
public boolean hasBorder()
StackDockComponent
hasBorder
in interface StackDockComponent
true
if this has a border, false
if the parent should paint one.public DockController getController()
null
public void setController(DockController controller)
StackDockComponent
setController
in interface StackDockComponent
controller
- the controller or null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |