|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel bibliothek.extension.gui.dock.theme.bubble.BubbleTab
@ColorCodes(value={"stack.tab.background.top.mouse","stack.tab.background.bottom.mouse","stack.tab.border.mouse","stack.tab.foreground.mouse","stack.tab.background.top","stack.tab.background.bottom","stack.tab.border","stack.tab.foreground","stack.tab.background.top.selected.mouse","stack.tab.background.bottom.selected.mouse","stack.tab.border.selected.mouse","stack.tab.foreground.selected.mouse","stack.tab.background.top.selected","stack.tab.background.bottom.selected","stack.tab.border.selected","stack.tab.foreground.selected","stack.tab.background.top.focused.mouse","stack.tab.background.bottom.focused.mouse","stack.tab.border.focused.mouse","stack.tab.foreground.focused.mouse","stack.tab.background.top.focused","stack.tab.background.bottom.focused","stack.tab.border.focused","stack.tab.foreground.focused"}) public class BubbleTab
A Tab
used by the BubbleStackDockComponent
.
Nested Class Summary | |
---|---|
protected class |
BubbleTab.BubbleTabColor
Some color needed on a Tab . |
protected class |
BubbleTab.BubbleTabFont
Some font needed on a Tab |
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 | |
---|---|
BubbleTab(BubbleStackDockComponent parent,
Dockable dockable)
Creates a new tab |
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. |
void |
doLayout()
|
JComponent |
getComponent()
Gets the Component which represents the element . |
Dockable |
getDockable()
Gets the element that is associated with this tab. |
DockElement |
getElement()
Gets the element which is represented by this . |
Dimension |
getMinimumSize()
Gets the minimal size this component should have |
Dimension |
getMinimumSize(Tab[] tabs)
Gets the minimum size of this tab under the assumption that this tab is displayed together with tabs . |
Insets |
getOverlap(TabPaneComponent other)
Tells how much of this component may be overlapped by another component other . |
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()
Gets the preferred size of this component |
Dimension |
getPreferredSize(Tab[] tabs)
Gets the preferred size of this tab under the assumption that this tab is displayed together with tabs . |
int |
getState()
|
TabPane |
getTabParent()
Gets the parent of this component. |
int |
getZOrder()
Gets the value of the z order. |
boolean |
isPaneVisible()
Tells whether this component is visible or not. |
boolean |
isUsedAsTitle()
Tells whether this DockElementRepresentative is used as title. |
protected void |
paintChildren(Graphics g)
|
void |
paintComponent(Graphics g)
|
void |
removeMouseInputListener(MouseInputListener listener)
Removes a listener from this representative. |
void |
run()
|
void |
setController(DockController controller)
|
void |
setIcon(Icon icon)
Sets the image of this tab. |
void |
setOrientation(TabPlacement orientation)
Tells this component how to paint itself. |
void |
setPaneVisible(boolean visible)
Changes the visibility state of this component. |
void |
setText(String text)
Sets the text of this tab. |
void |
setTooltip(String tooltip)
Sets the tooltip of this tab. |
void |
setZOrder(int order)
Sets the z order of this component. |
void |
stateChanged(ChangeEvent e)
|
void |
stopAnimation()
Stops the animation of this tab. |
void |
updateFonts()
Ensures that the correct font modifier is used. |
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 |
Methods inherited from interface bibliothek.gui.dock.station.stack.tab.TabPaneComponent |
---|
getBounds, getMaximumSize, setBounds |
Constructor Detail |
---|
public BubbleTab(BubbleStackDockComponent parent, Dockable dockable)
parent
- the owner of this tabdockable
- the element whose title will be shown on this tabMethod Detail |
---|
public TabPane getTabParent()
TabPaneComponent
getTabParent
in interface TabPaneComponent
public Dockable getDockable()
Tab
getDockable
in interface Tab
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 setTooltip(String tooltip)
CombinedTab
setTooltip
in interface CombinedTab
tooltip
- the tooltip text, can be null
public void setPaneVisible(boolean visible)
TabPaneComponent
setPaneVisible
in interface TabPaneComponent
visible
- the new statepublic boolean isPaneVisible()
TabPaneComponent
isPaneVisible
in interface TabPaneComponent
true
if visible, false
otherwisepublic void setOrientation(TabPlacement orientation)
TabPaneComponent
setOrientation
in interface TabPaneComponent
orientation
- the orientation, not null
public int getState()
public void setController(DockController controller)
public void setZOrder(int order)
TabPaneComponent
TabPaneComponent
s
on the parent TabPane
. The implementation may increase or
decrease z-orders to prevent collisions between components with the same
order.
setZOrder
in interface TabPaneComponent
order
- the order, can be any integer.public int getZOrder()
TabPaneComponent
getZOrder
in interface TabPaneComponent
TabPaneComponent.setZOrder(int)
public Insets getOverlap(TabPaneComponent other)
TabPaneComponent
other
.
getOverlap
in interface TabPaneComponent
other
- another component which may be painted over this component
null
public 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 void run()
run
in interface Runnable
public Dimension getPreferredSize(Tab[] tabs)
Tab
tabs
.
getPreferredSize
in interface Tab
tabs
- the displayed tabs, exactly one entry is this
and no entry is null
public Dimension getPreferredSize()
TabPaneComponent
getPreferredSize
in interface TabPaneComponent
getPreferredSize
in class JComponent
public Dimension getMinimumSize(Tab[] tabs)
Tab
tabs
.
getMinimumSize
in interface Tab
tabs
- the displayed tabs, exactly one entry is this
and no entry is null
public Dimension getMinimumSize()
TabPaneComponent
getMinimumSize
in interface TabPaneComponent
getMinimumSize
in class JComponent
public void doLayout()
doLayout
in class Container
public void paintComponent(Graphics g)
paintComponent
in class JComponent
protected void paintChildren(Graphics g)
paintChildren
in class JComponent
public 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 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 void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
public void updateFonts()
public void setIcon(Icon icon)
CombinedTab
setIcon
in interface CombinedTab
icon
- an icon that should be shown, can be null
public void setText(String text)
CombinedTab
setText
in interface CombinedTab
text
- the text to displaypublic void stopAnimation()
animation
of this tab.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |