|
|||||||||
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.JToolBar com.levigo.jadice.demo.SorterToolbar
public class SorterToolbar
SorterToolbar
provides a component that is useful for displaying the
PageSorter
component as a toolbar or rather as
floating frame.
With most look and feels, the user can drag out a toolbar into a separate window (unless the
floatable
property is set to false
). Like its super class
JToolBar
, it is RECOMMENDED, for dragging-out work correctly, that you add
SorterToolbar
instances to one of the four "sides" of a container whose layout
manager is a BorderLayout
, and do not add children to any of the other four "sides".
Use
for changing between horizontal and vertical
orientation.
,
Serialized FormNested Class Summary | |
---|---|
class |
SorterToolbar.SorterToolBarUI
FancyToolBarUI for the Sorter. |
Nested classes/interfaces inherited from class javax.swing.JToolBar |
---|
JToolBar.AccessibleJToolBar, JToolBar.Separator |
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.BaselineResizeBehavior, 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 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 | |
---|---|
SorterToolbar(PageView view,
Context context)
Constructor |
Method Summary | |
---|---|
void |
closeSorter()
Hides this sorter toolbar instance. |
Context |
getContext()
Returns the context reference, which is internally used to propagate context and state changes. |
PageSorter |
getSorter()
Returns the the contained page sorter |
SorterToolbar.SorterToolBarUI |
getUI()
|
PageView |
getView()
Returns the associated PageView component. |
boolean |
isVisible()
Returns whether this instance is visible. |
void |
openSorter()
Shows this sorter toolbar instance. |
protected void |
propagateAddOnStateChange()
Should be called to propagate addOn state changes to associated context. |
void |
setLayout(LayoutManager mgr)
To work properly the sorter toolbar needs an instance of BorderLayout as LayoutManager. |
void |
setUI(ToolBarUI ui)
To work properly the sorter toolbar needs an instance of SorterToolbar.SorterToolBarUI . |
void |
toggle()
Toggles (shows/hides) the appearance of this sorter toolbar instance |
Methods inherited from class javax.swing.JToolBar |
---|
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setMargin, setOrientation, setRollover, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SorterToolbar(PageView view, Context context)
view
- associated viewer instancecontext
- associated context objectMethod Detail |
---|
public void setLayout(LayoutManager mgr)
BorderLayout
as LayoutManager.
In order to ensure the BorderLayout
-Manager type, this method accepts only instances of
of BorderLayout
.
setLayout
in class JToolBar
public void setUI(ToolBarUI ui)
SorterToolbar.SorterToolBarUI
.
Therefore this method accepts only instances of SorterToolbar.SorterToolBarUI
.
setUI
in class JToolBar
public SorterToolbar.SorterToolBarUI getUI()
getUI
in class JToolBar
public void closeSorter()
It is recommended to call this method on the Swing EDT, otherwise a
IllegalStateException
will be thrown.
public void openSorter()
It is recommended to call this method on the Swing EDT, otherwise a
IllegalStateException
will be thrown.
public void toggle()
public PageSorter getSorter()
public boolean isVisible()
isVisible
in class Component
true
if the component is visible, false
otherwiseprotected void propagateAddOnStateChange()
public PageView getView()
PageView
component.
PageView
referencepublic Context getContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |