|
||||||||||
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
bibliothek.gui.dock.util.swing.DComponent
bibliothek.extension.gui.dock.theme.eclipse.rex.tab.BaseTabComponent
@ColorCodes(value={"stack.tab.border","stack.tab.border.selected","stack.tab.border.selected.focused","stack.tab.border.selected.focuslost","stack.tab.top","stack.tab.top.selected","stack.tab.top.selected.focused","stack.tab.top.selected.focuslost","stack.tab.bottom","stack.tab.bottom.selected","stack.tab.bottom.selected.focused","stack.tab.bottom.selected.focuslost","stack.tab.text","stack.tab.text.selected","stack.tab.text.selected.focused","stack.tab.text.selected.focuslost","stack.border"}) public abstract class BaseTabComponent
A base implementation of TabComponent
.
Nested Class Summary |
---|
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 | |
---|---|
protected TabColor |
colorStackBorder
|
protected TabColor |
colorStackTabBorder
|
protected TabColor |
colorStackTabBorderSelected
|
protected TabColor |
colorStackTabBorderSelectedFocused
|
protected TabColor |
colorStackTabBorderSelectedFocusLost
|
protected TabColor |
colorStackTabBottom
|
protected TabColor |
colorStackTabBottomSelected
|
protected TabColor |
colorStackTabBottomSelectedFocused
|
protected TabColor |
colorStackTabBottomSelectedFocusLost
|
protected TabColor |
colorStackTabText
|
protected TabColor |
colorStackTabTextSelected
|
protected TabColor |
colorStackTabTextSelectedFocused
|
protected TabColor |
colorStackTabTextSelectedFocusLost
|
protected TabColor |
colorStackTabTop
|
protected TabColor |
colorStackTabTopSelected
|
protected TabColor |
colorStackTabTopSelectedFocused
|
protected TabColor |
colorStackTabTopSelectedFocusLost
|
protected TabFont |
fontFocused
|
protected TabFont |
fontSelected
|
protected TabFont |
fontUnselected
|
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 | |
---|---|
BaseTabComponent(RexTabbedComponent component,
DockController controller,
StackDockStation station,
Dockable dockable,
int index)
Creates a new TabComponent |
Method Summary | |
---|---|
void |
addMouseInputListener(MouseInputListener listener)
Adds a listener to this representative, it is not defined what to do with that listener, but most subclasses would just add the listener to their component . |
void |
bind()
Informs this tab that it will be shown soon |
boolean |
doPaintIconWhenInactive()
|
ButtonPanel |
getButtons()
|
Component |
getComponent()
Gets the Component which represents the element . |
DockController |
getController()
|
Dockable |
getDockable()
|
DockElement |
getElement()
Gets the element which is represented by this . |
int |
getIndex()
|
Point |
getPopupLocation(Point click,
boolean popupTrigger)
Tells whether a popup menu should be opened when the user clicks at click with the mouse. |
StackDockStation |
getStation()
|
RexTabbedComponent |
getTabbedComponent()
|
boolean |
isFocused()
|
boolean |
isSelected()
|
boolean |
isUsedAsTitle()
Tells whether this DockElementRepresentative is used as title. |
void |
removeMouseInputListener(MouseInputListener listener)
Removes a listener from this representative. |
void |
setFocused(boolean focused)
|
void |
setIndex(int index)
|
void |
setPaintIconWhenInactive(boolean paintIconWhenInactive)
|
void |
setSelected(boolean selected)
|
void |
unbind()
Informs this tab that it is invisible and must not have any connections to other resources |
protected abstract void |
updateBorder()
Called when one of the border colors changed |
protected void |
updateFont()
Called when the font of this component has to be updated |
Methods inherited from class bibliothek.gui.dock.util.swing.DComponent |
---|
getFontModifier, setFontModifier, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface bibliothek.extension.gui.dock.theme.eclipse.rex.tab.TabComponent |
---|
addMouseListener, addMouseMotionListener, getContentBorder, getOverlap, removeMouseListener, removeMouseMotionListener, update |
Field Detail |
---|
protected final TabColor colorStackTabBorder
protected final TabColor colorStackTabBorderSelected
protected final TabColor colorStackTabBorderSelectedFocused
protected final TabColor colorStackTabBorderSelectedFocusLost
protected final TabColor colorStackTabTop
protected final TabColor colorStackTabTopSelected
protected final TabColor colorStackTabTopSelectedFocused
protected final TabColor colorStackTabTopSelectedFocusLost
protected final TabColor colorStackTabBottom
protected final TabColor colorStackTabBottomSelected
protected final TabColor colorStackTabBottomSelectedFocused
protected final TabColor colorStackTabBottomSelectedFocusLost
protected final TabColor colorStackTabText
protected final TabColor colorStackTabTextSelected
protected final TabColor colorStackTabTextSelectedFocused
protected final TabColor colorStackTabTextSelectedFocusLost
protected final TabColor colorStackBorder
protected final TabFont fontSelected
protected final TabFont fontFocused
protected final TabFont fontUnselected
Constructor Detail |
---|
public BaseTabComponent(RexTabbedComponent component, DockController controller, StackDockStation station, Dockable dockable, int index)
TabComponent
component
- the owner of this tabcontroller
- the controller from which this component should read colorsstation
- the station on which this component isdockable
- the element which is represented by this componentindex
- the location of this tab relative to other tabsMethod Detail |
---|
protected abstract void updateBorder()
protected void updateFont()
public void bind()
TabComponent
bind
in interface TabComponent
public void unbind()
TabComponent
unbind
in interface TabComponent
public Dockable getDockable()
public DockElement getElement()
DockElementRepresentative
this
.
The result of this method must not change.
getElement
in interface DockElementRepresentative
null
public boolean isUsedAsTitle()
DockElementRepresentative
DockElementRepresentative
is used as title.DockRelocator
can allow drag & drop only for titles.Dockable
should have only one element that is a title,
so if in doubt return false
.
isUsedAsTitle
in interface DockElementRepresentative
true
if this representative should be seen as titlepublic void addMouseInputListener(MouseInputListener listener)
DockElementRepresentative
component
. It is valid to do nothing.
addMouseInputListener
in interface DockElementRepresentative
listener
- the new listenerpublic void removeMouseInputListener(MouseInputListener listener)
DockElementRepresentative
removeMouseInputListener
in interface DockElementRepresentative
listener
- the listener to removepublic Point getPopupLocation(Point click, boolean popupTrigger)
DockElementRepresentative
click
with the mouse. If yes, then the top left edge
of the popup should be returned, otherwise null
should be
returned.
getPopupLocation
in interface DockElementRepresentative
click
- the location where the user clicked with the mousepopupTrigger
- whether the invocation is the systems popup trigger
or not. Many implementations of this method will return click
in case of true
, and null
in case of false
null
if no
popup-menu should be openedpublic DockController getController()
public StackDockStation getStation()
public ButtonPanel getButtons()
public RexTabbedComponent getTabbedComponent()
public Component getComponent()
DockElementRepresentative
Component
which represents the element
.
The result of this method must not change.
getComponent
in interface TabComponent
getComponent
in interface DockElementRepresentative
null
public void setFocused(boolean focused)
setFocused
in interface TabComponent
public boolean isFocused()
public void setSelected(boolean selected)
setSelected
in interface TabComponent
public boolean isSelected()
public void setIndex(int index)
setIndex
in interface TabComponent
public int getIndex()
public boolean doPaintIconWhenInactive()
public void setPaintIconWhenInactive(boolean paintIconWhenInactive)
setPaintIconWhenInactive
in interface TabComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |