|
||||||||||
| PREV CLASS Documentation homepage 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.JToolBar
ilog.views.appframe.swing.IlvToolBar
public class IlvToolBar
Toolbar that initializes its buttons from the settings of an application.
| Nested Class Summary |
|---|
| 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 String |
AUTO_HIDE_PROPERTY
Bound property of the toolbar that specifies whether the visibility of the toolbar should be automatically updated when components are added or removed from the toolbar. |
static String |
AUTO_RESIZE_PROPERTY
Bound property of the toolbar that specifies whether the bounds of the toolbar should be automatically updated when it is added or removed components. |
static String |
DEFAULT_TOOLBAR_NAME
Default value of the "name"attribute of the settings element
that provides the settings of the toolbar. |
static String |
HIDE_BUTTON_TEXT
Bound property of the toolbar that specifies that the text of buttons of the toolbar should not be displayed. |
static String |
SELECTED_BORDER_PROPERTY
Property that provides the border of a button when it is selected. |
static String |
TOOLBAR_BUTTON_SETTINGS_TYPE
The type of the root settings element that provides the settings of a button of a toolbar. |
static String |
TOOLBAR_SETTINGS_TYPE
The type of the root settings element that provides the settings of an IlvToolBar instance. |
| 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 | |
|---|---|
IlvToolBar()
Constructs a new toolbar; the orientation defaults to HORIZONTAL. |
|
IlvToolBar(int orientation)
Creates a new toolbar with the specified orientation. |
|
IlvToolBar(String name,
int orientation)
Creates a new toolbar with a specified name and
orientation. |
|
| Method Summary | |
|---|---|
static JButton |
AddActionButton(Action action,
Container container,
int index,
IlvApplication application)
Adds a new button to the specified container at the specified index. |
protected void |
addImpl(Component component,
Object constraints,
int index)
If a JButton is being added, it is set a mouse listener
that controls double-click events. |
static JSeparator |
AddSeparator(Container container,
int index)
Adds a new separator within the specified container. |
IlvApplication |
getApplication()
Returns the application of the toolbar. |
Insets |
getButtonInsets()
Gets the insets of a button created within this toolbar. |
Border |
getDefaultButtonBorder()
Gets the border used for creating buttons inserted in this toolbar. |
Dimension |
getDefaultIconButtonSize()
Gets the default size of buttons created in this toolbar and displays just icons. |
Dimension |
getDefaultSeparatorSize()
Gets the default size of separators created in this toolbar. |
int |
getIconsSize()
Returns the size of icons of the toolbar. |
IlvSettings |
getSettings()
Returns the settings that the toolbar used to read its content. |
IlvSettingsElement |
getSettingsElement()
Returns the settings element that provides the settings for this toolbar. |
String |
getSettingsName()
Gets the name that identifies the bar within the settings. |
IlvSettingsQuery |
getSettingsQuery()
Returns the query that selects the settings element that defines the content of this toolbar. |
Dimension |
getSize()
|
String |
getUIClassID()
Returns the name of the L&F class that renders this component. |
String |
getUndockedTitle()
Returns the undocked title of the toolbar. |
boolean |
isAutoHide()
Determines whether the toolbar is automatically hidden after it has been removed all its child components. |
boolean |
isAutoResize()
Determines whether the bounds of the toolbar are automatically updated after the toolbar is added or removed child components. |
void |
setApplication(IlvApplication application)
Sets the application of the toolbar. |
void |
setAutoHide(boolean autoHide)
Specifies whether the toolbar is automatically hidden after it is removed all its child components. |
void |
setAutoResize(boolean autoResize)
Specifies whether the bounds of toolbar should be automatically updated after the toolbar is added or removed child components. |
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setBounds(Rectangle r)
|
void |
setButtonInsets(Insets insets)
Sets default button insets. |
static void |
SetButtonProperties(IlvToolBar toolbar,
AbstractButton button,
Action action)
Sets the default button properties, like the border defined for the specified toolbar, to the specified button. |
void |
setIconsSize(int iconsSize)
Sets the size of icons of the toolbar. |
void |
setSettings(IlvSettings settings)
Sets the settings that the toolbar uses to read its content. |
void |
setSettingsElement(IlvSettingsElement element)
Forces the settings of the toolbar to be read and written from the specified settings element. |
void |
setSettingsName(String name)
Sets the name that identifies the toolbar within the settings of the toolbar, set by invoking the method setSettings(ilog.views.appframe.settings.IlvSettings) |
void |
setSettingsQuery(IlvSettingsQuery query)
Sets the query that selects the settings element that defines the content of this toolbar. |
void |
setSize(Dimension d)
|
void |
setSize(int width,
int height)
|
void |
setUndockedTitle(String undockedTitle)
Sets the undocked title of the toolbar. |
void |
setVisible(boolean aFlag)
Makes the component visible or invisible. |
| Methods inherited from class javax.swing.JToolBar |
|---|
add, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, 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 String DEFAULT_TOOLBAR_NAME
"name"attribute of the settings element
that provides the settings of the toolbar.
public static String HIDE_BUTTON_TEXT
public static final String TOOLBAR_SETTINGS_TYPE
IlvToolBar instance.
public static final String TOOLBAR_BUTTON_SETTINGS_TYPE
public static final String SELECTED_BORDER_PROPERTY
public static final String AUTO_RESIZE_PROPERTY
If the value of the property equals Boolean.TRUE,
the size of the toolbar is automatically updated to take into account
components that are added or removed from the toolbar. This
mechanism is not activated while the toolbar is being initialized
from the settings.
If the value of the property does not equal
Boolean.TRUE, the bounds of the toolbar remain
unchanged whenever components are added or removed.
By default, an IlvToolBar is not automatically
resizable.
setAutoResize(boolean),
isAutoResize(),
Constant Field Valuespublic static final String AUTO_HIDE_PROPERTY
If the value of the property equals Boolean.TRUE,
the toolbar is automatically hidden if it does not contain
any child components. It is also automatically shown when new
components are added and that the bar was previously hidden by
this mechanism.
If the value of the property does not equal
Boolean.TRUE, the visibility of the toolbar stays
unchanged whenever it becomes empty.
By default, the toolbar the automatic hiding property
of the toolbar is set to Boolean.TRUE.
setAutoHide(boolean),
isAutoHide(),
Constant Field Values| Constructor Detail |
|---|
public IlvToolBar()
HORIZONTAL.
public IlvToolBar(int orientation)
orientation.
The orientation must be either HORIZONTAL
or VERTICAL.
orientation - The desired orientation.
public IlvToolBar(String name,
int orientation)
name and
orientation.
If orientation is an invalid value, an exception will
be thrown.
name - The name of the toolbar.orientation - The initial orientation. It must be one of these
values:HORIZONTALVERTICALIllegalArgumentException - if orientation is neither
HORIZONTAL nor VERTICAL| Method Detail |
|---|
public String getUIClassID()
getUIClassID in class JToolBarJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)public IlvApplication getApplication()
setApplication(ilog.views.appframe.IlvApplication)public void setApplication(IlvApplication application)
application - The new application of the toolbar.getApplication()public IlvSettings getSettings()
public void setSettings(IlvSettings settings)
settings - The new settings of the toolbar.public String getSettingsName()
setSettingsName(java.lang.String), the name of the
default menu bar defined in the Application Framework settings
will be returned.
public void setSettingsName(String name)
setSettings(ilog.views.appframe.settings.IlvSettings)
name - The new settings name of the toolbar.public void setButtonInsets(Insets insets)
insets - The new button insets.public Insets getButtonInsets()
public int getIconsSize()
public void setIconsSize(int iconsSize)
iconsSize - the new size of icons of the toolbar.getIconsSize()public String getUndockedTitle()
null if none was specifiedpublic void setUndockedTitle(String undockedTitle)
public Border getDefaultButtonBorder()
public Dimension getDefaultIconButtonSize()
public Dimension getDefaultSeparatorSize()
public void setSettingsQuery(IlvSettingsQuery query)
query - The settings query.getSettingsQuery()public final IlvSettingsQuery getSettingsQuery()
setSettingsQuery(ilog.views.appframe.settings.IlvSettingsQuery) or if no settings name has been defined
using the method setSettingsName(java.lang.String), this method will return
null.setSettingsQuery(ilog.views.appframe.settings.IlvSettingsQuery)public void setSettingsElement(IlvSettingsElement element)
getSettings() with the query getSettingsQuery().
element - The settings element that provides the settings for the
toolbar.getSettingsElement()public IlvSettingsElement getSettingsElement()
setSettingsElement(ilog.views.appframe.settings.IlvSettingsElement) method, it will be returned. Otherwise,
the settings element is selected from the settings given by the
getSettings() method with the query returned by
getSettingsQuery().
null if no settings
element could be found.setSettingsElement(ilog.views.appframe.settings.IlvSettingsElement),
getSettingsQuery()
public static JButton AddActionButton(Action action,
Container container,
int index,
IlvApplication application)
action - The action of the button to create.container - The container to create the new button in.index - The insertion index of the new component within its
parent container. If it is equal to -1, the new component
will be added at the last position in the children of the container.application - The application used for internationalization services.
public static void SetButtonProperties(IlvToolBar toolbar,
AbstractButton button,
Action action)
button.
toolbar - The toolbar providing the default button properties.
If null, default static properties defined for the
IlvToolBar(java.lang.String, int) class will be set to the button.button - The button to set properties to.action - The action of the button
public static JSeparator AddSeparator(Container container,
int index)
container - The container to add a new separator to.index - The insertion index of