|
||||||||||
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 uic.widgets.UICToolBar
public class UICToolBar
Replacement ToolBar that has many usability features and works closely with the UICToolBar. This class is a container for buttons and other widgets which are shown in so called toolbar containers. These are mostly attached to the edgets of a top-level window.
Nested Class Summary | |
---|---|
static class |
UICToolBar.ArrowsIcon
The icon on the more-items button. |
protected static class |
UICToolBar.ScaleHandle
|
static class |
UICToolBar.ToolBarLocation
Data container that displays the corrent location of a UICToolBar. |
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.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
FLAT
|
static int |
FLOATING
|
static int |
HIDDEN
|
protected int |
location
|
protected int |
oldLocation
|
static int |
TEXT_BELOW
|
static int |
TEXT_NEXT_TO
|
static int |
TEXT_NONE
|
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 | |
---|---|
UICToolBar()
Create a toolbar with location == TOP and no name. |
|
UICToolBar(int location)
Create a toolbar without a name. |
|
UICToolBar(int location,
String name)
Create a new UICToolbar. |
|
UICToolBar(int location,
String name,
Component component)
|
|
UICToolBar(String name)
Create a toolbar with location is TOP |
Method Summary | |
---|---|
Component |
add(Component child)
Overloaded method; see Component |
Component |
add(Component child,
int index)
Overloaded method; see Component |
void |
add(Component child,
Object contraints)
Overloaded method; see Component |
protected void |
doFlat(boolean on)
|
UICToolBar.ToolBarLocation |
getCurrentLocation()
Get curent state of toolBar, probably only usefull for persistency purposes. |
int |
getIconSize()
|
Dimension |
getPreferredSize()
|
WindowRepresenter |
getWindowRepresenter()
|
void |
hideToolBar()
Hide the toolbar. |
boolean |
isLoneContainer()
|
void |
moreButtonPressedSlot()
Called when the 'more' button has been pressed. |
void |
openContextMenuSlot(int x,
int y)
Method shows the popup menu for this toolbar. |
void |
openToolBarSlot()
Called when clicking on a 'flat' toolbar to open it again in its last known location. |
void |
remove(Component c)
|
void |
removeAll()
|
void |
restoreToolBar()
Called when closing a 'floating' toolbar to open it again in its last known location. |
void |
setIconSize(int pixelSize)
|
void |
setLayout(LayoutManager mgr)
Overloaded method; see Component |
void |
setLocation(int loc,
boolean hidden)
Set the orientation of the toolbar, changing its attachment directly. |
void |
setOrientation(int orientation)
Set the orientation of the toolbar, changing its attachment directly. |
void |
setShowIcons(boolean on)
|
void |
setShowText(int textPosition)
|
void |
setToolBarContainer(WindowRepresenter toolbarContainer)
set the WindowContainer that knows which set of ToolbarContainers and which Window this toolbar belongs to. |
void |
show(int location)
Open/move toolbar to location. |
boolean |
showIcons()
|
int |
showText()
|
Methods inherited from class javax.swing.JToolBar |
---|
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setMargin, setRollover, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FLAT
public static final int FLOATING
public static final int HIDDEN
public static final int TEXT_NONE
public static final int TEXT_BELOW
public static final int TEXT_NEXT_TO
protected int location
protected int oldLocation
Constructor Detail |
---|
public UICToolBar()
public UICToolBar(int location)
public UICToolBar(String name)
public UICToolBar(int location, String name)
location
- the location where the toolbar should appear on the target Window.
One of TOP/BOTTOM/LEFT/RIGHT/FLAT/FLOATINGname
- the name of the toolbar; is used for tooltips and titles.for an easier alternative.
public UICToolBar(int location, String name, Component component)
Method Detail |
---|
public boolean isLoneContainer()
public void setLayout(LayoutManager mgr)
setLayout
in class JToolBar
public void setToolBarContainer(WindowRepresenter toolbarContainer)
public WindowRepresenter getWindowRepresenter()
public UICToolBar.ToolBarLocation getCurrentLocation()
public void openToolBarSlot()
public void restoreToolBar()
public void openContextMenuSlot(int x, int y)
public void setOrientation(int orientation)
setOrientation
in class JToolBar
orientation
- Choose one of SwingConstants.LEFT, RIGHT, TOP, BOTTOM or
UICToolBar.HIDDEN, UICToolBar.FLOATING.public void setLocation(int loc, boolean hidden)
loc
- Choose one of SwingConstants.LEFT, RIGHT, TOP, BOTTOM or
UICToolBar.HIDDEN, UICToolBar.FLOATING.hidden
- if true will register the orientation to use when the user
selects (un-hides) the toolbar; making it hidden now.public Component add(Component child)
add
in class Container
public Component add(Component child, int index)
add
in class Container
public void add(Component child, Object contraints)
add
in class Container
public void removeAll()
removeAll
in class Container
public void remove(Component c)
remove
in class Container
public void show(int location)
location
- LEFT/RIGHT/TOP/BOTTOM/FLAT are static on this class.public void hideToolBar()
public void moreButtonPressedSlot()
protected void doFlat(boolean on)
public int getIconSize()
public void setIconSize(int pixelSize)
public boolean showIcons()
public void setShowIcons(boolean on)
public int showText()
public void setShowText(int textPosition)
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |