|
||||||||||
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.JLabel
bibliothek.extension.gui.dock.theme.flat.FlatTab.FlatButton
protected class FlatTab.FlatButton
A small button which can be clicked by the user.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLabel |
---|
JLabel.AccessibleJLabel |
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.JLabel |
---|
labelFor |
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 javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
FlatTab.FlatButton(Dockable dockable)
Constructs a new button |
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 |
dockableFocused(DockableFocusEvent event)
Invoked when dockable has gained the focus. |
JComponent |
getComponent()
Gets the Component which represents the element . |
DockElement |
getElement()
Gets the element which is represented by this . |
Dimension |
getMinimumSize()
|
Point |
getPopupLocation(Point click,
boolean popupTrigger)
Tells whether a popup menu should be opened when the user clicks at click with the mouse. |
Dimension |
getPreferredSize()
|
boolean |
isSelected()
Determines whether this button is selected or not. |
void |
paintComponent(Graphics g)
|
void |
removeMouseInputListener(MouseInputListener listener)
Removes a listener from this representative. |
void |
setController(DockController controller)
|
void |
setIndex(int index)
Sets the location of this button. |
void |
setTooltip(String tooltip)
Sets the tooltip of this tab. |
void |
updateForeground()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.station.stack.CombinedTab |
---|
setIcon, setText |
Constructor Detail |
---|
public FlatTab.FlatButton(Dockable dockable)
dockable
- the Dockable for which this tab is displayedMethod Detail |
---|
public void updateForeground()
public void setController(DockController controller)
public 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 void dockableFocused(DockableFocusEvent event)
DockableFocusListener
dockable
has gained the focus.
dockableFocused
in interface DockableFocusListener
event
- an event that contains the new owner of the focuspublic JComponent getComponent()
DockElementRepresentative
Component
which represents the element
.
The result of this method must not change.
getComponent
in interface DockElementRepresentative
getComponent
in interface CombinedTab
null
public DockElement getElement()
DockElementRepresentative
this
.
The result of this method must not change.
getElement
in interface DockElementRepresentative
null
public 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 Dimension getPreferredSize()
getPreferredSize
in class JComponent
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public void setTooltip(String tooltip)
CombinedTab
setTooltip
in interface CombinedTab
tooltip
- the tooltip text, can be null
public void setIndex(int index)
selectedIndex
-property
whether it is selected or not.
setIndex
in interface CombinedTab
index
- the locationpublic boolean isSelected()
true
if the button is selectedpublic void paintComponent(Graphics g)
paintComponent
in class JComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |