Application (tag) |
From JAXXWiki
The <Application> tag is a special class tag which creates an instance of jaxx.runtime.swing.Application, a subclass of javax.swing.JFrame. The package name is assumed only because jaxx.runtime.swing is imported by default. The fully qualified form of this tag is <jaxx.runtime.swing.Application>.
This information is based on the Java Development Kit version 5.0. Other versions of Java may have more or fewer features.
Contents |
Usage
The Application tag is an invisible component. The tag can be included inside of a container, but the Application will not actually become a child of the container.
<Application> extends <JFrame>, and is typically the top-level window in JAXX applications.
Special Behaviors
Special behaviors specific to Application
JAXX files with <Application> as their root component (in other words, JAXX classes that subclass Application) automatically receive a main() method which creates and displays the Application window.
Special behaviors inherited from JFrame
- Frames which do not have a width or height attribute defined will automatically be pack()ed upon display.
- The default value of defaultCloseOperation is dispose_on_close instead of hide_on_close
Child tags
To assign a JMenuBar to a Application, include a <JMenuBar> tag as a child tag.
Attributes
These attributes may appear on the <Application> tag. As XML is a text file format, all attribute values must be represented as strings — either strings which can be converted into the destination type (e.g. height="1234" for the int-typed attribute height) or strings of Java code in curly braces (e.g. border="{BorderFactory.createEtchedBorder()}" for the Border-typed attribute border). See Data types for more information.
Attributes specific to Application
These attributes are defined by Application (or its TagHandler).
| Attribute | Type | Description |
|---|---|---|
| lookAndFeel | java.lang.String | Sets the system-wide look and feel. Must be "cross_platform", "system", or the fully-qualified name of a Java look and feel class |
Attributes inherited from JFrame
These attributes are common to all classes that descend from javax.swing.JFrame.
| Attribute | Type | Description |
|---|---|---|
| contentPane | java.awt.Container | Equivalent to setContentPane() |
| defaultCloseOperation | int | Equivalent to setDefaultCloseOperation() Must be one of: do_nothing_on_close, hide_on_close, or dispose_on_close |
| glassPane | java.awt.Container | Equivalent to setGlassPane() |
| JMenuBar | javax.swing.JMenuBar | Equivalent to setJMenuBar() |
| layeredPane | javax.swing.JLayeredPane | Equivalent to setLayeredPane() |
Attributes inherited from Frame
These attributes are common to all classes that descend from java.awt.Frame.
| Attribute | Type | Description |
|---|---|---|
| extendedState | int | Equivalent to setExtendedState() |
| iconImage | javax.swing.Icon | Equivalent to setIconImage() |
| maximizedBounds | java.awt.Rectangle | Equivalent to setMaximizedBounds() |
| resizable | boolean | Equivalent to setResizable() |
| title | java.lang.String | Equivalent to setTitle() |
| undecorated | boolean | Equivalent to setUndecorated() |
Attributes inherited from Window
These attributes are common to all classes that descend from java.awt.Window.
| Attribute | Type | Description |
|---|---|---|
| alwaysOnTop | boolean | Equivalent to setAlwaysOnTop() |
| cursor | java.awt.Cursor | Equivalent to setCursor() |
| focusableWindowState | boolean | Equivalent to setFocusableWindowState() |
| locationByPlatform | boolean | Equivalent to setLocationByPlatform() |
| locationRelativeTo | java.awt.Component | Equivalent to setLocationRelativeTo() |
Attributes inherited from Container
These attributes are common to all classes that descend from java.awt.Container.
| Attribute | Type | Description |
|---|---|---|
| focusCycleRoot | boolean | Equivalent to setFocusCycleRoot() |
| focusTraversalPolicy | java.awt.FocusTraversalPolicy | Equivalent to setFocusTraversalPolicy() |
| focusTraversalPolicyProvider | boolean | Equivalent to setFocusTraversalPolicyProvider() |
| layout | java.awt.LayoutManager | Equivalent to setLayout() |
Attributes inherited from Component
These attributes are common to all classes that descend from java.awt.Component.
| Attribute | Type | Description |
|---|---|---|
| bounds | java.awt.Rectangle | Equivalent to setBounds() |
| componentOrientation | java.awt.ComponentOrientation | Equivalent to setComponentOrientation() |
| cursor | java.awt.Cursor | Equivalent to setCursor() |
| dropTarget | java.awt.dnd.DropTarget | Equivalent to setDropTarget() |
| enabled | boolean | Equivalent to setEnabled() |
| focusable | boolean | Equivalent to setFocusable() |
| focusTraversalKeysEnabled | boolean | Equivalent to setFocusTraversalKeysEnabled() |
| font | java.awt.Font | Equivalent to setFont() |
| foreground | java.awt.Color | Equivalent to setForeground() |
| height | int | Sets the component's height (more information) |
| ignoreRepaint | boolean | Equivalent to setIgnoreRepaint() |
| locale | java.util.Locale | Equivalent to setLocale() |
| location | java.awt.Point | Equivalent to setLocation() |
| maximumSize | java.awt.Dimension | Equivalent to setMaximumSize() |
| minimumSize | java.awt.Dimension | Equivalent to setMinimumSize() |
| name | java.lang.String | Equivalent to setName() |
| preferredSize | java.awt.Dimension | Equivalent to setPreferredSize() |
| size | java.awt.Dimension | Equivalent to setSize() |
| visible | boolean | Equivalent to setVisible() |
| width | int | Sets the component's width (more information) |
JAXX attributes
These attributes are common to all JAXX class tags.
| Attribute | Type | Description |
|---|---|---|
| constraints | java.lang.Object | Layout constraints to be used when adding to parent (full documentation) |
| constructorParams | comma-separated Java expressions | Parameters to be passed to object's constructor (full documentation) |
| id | java.lang.String | Name used to refer to object elsewhere in file (full documentation) |
| styleClass | java.lang.String | CSS style class (full documentation) |
Events
You can listen to events by assigning Java code to an event handler, such as onActionPerformed='dispose()'. The Java code will be invoked when the event is fired. See event handlers for more details.
Events inherited from Window
These events are common to all classes that descend from java.awt.Window.
| Event | Listener class | Description |
|---|---|---|
| onPropertyChange | PropertyChangeListener | Called when a bound property is changed. |
| onWindowActivated | WindowListener | Invoked when the Window is set to be the active Window. |
| onWindowClosed | WindowListener | Invoked when a window has been closed as the result of calling dispose on the window. |
| onWindowClosing | WindowListener | Invoked when the user attempts to close the window from the window's system menu. |
| onWindowDeactivated | WindowListener | Invoked when a Window is no longer the active Window. |
| onWindowDeiconified | WindowListener | Invoked when a window is changed from a minimized to a normal state. |
| onWindowGainedFocus | WindowFocusListener | Invoked when the Window is set to be the focused Window. |
| onWindowIconified | WindowListener | Invoked when a window is changed from a normal to a minimized state. |
| onWindowLostFocus | WindowFocusListener | Invoked when the Window is no longer the focused Window. |
| onWindowOpened | WindowListener | Invoked the first time a window is made visible. |
| onWindowStateChanged | WindowStateListener | Invoked when window state is changed. |
Events inherited from Container
These events are common to all classes that descend from java.awt.Container.
| Event | Listener class | Description |
|---|---|---|
| onComponentAdded | ContainerListener | Invoked when a component has been added to the container. |
| onComponentRemoved | ContainerListener | Invoked when a component has been removed from the container. |
| onPropertyChange | PropertyChangeListener | Called when a bound property is changed. |
Events inherited from Component
These events are common to all classes that descend from java.awt.Component.
| Event | Listener class | Description |
|---|---|---|
| onAncestorResized | HeirarchyBoundsListener | Called when an ancestor of the source is resized. |
| onCaretPositionChanged | InputMethodListener | Invoked when the caret within composed text has changed. |
| onComponentHidden | ComponentListener | Invoked when the component has been made invisible. |
| onComponentMoved | ComponentListener | Invoked when the component's position changes. |
| onComponentResized | ComponentListener | Invoked when the component's size changes. |
| onComponentShown | ComponentListener | Invoked when the component has been made visible. |
| onFocusGained | FocusListener | Invoked when a component gains the keyboard focus. |
| onFocusLost | FocusListener | Invoked when a component loses the keyboard focus. |
| onHeirarchyChanged | HeirarchyListener | Called when the hierarchy has been changed. |
| onInputMethodTextChanged | InputMethodListener | Invoked when the text entered through an input method has changed. |
| onKeyPressed | KeyListener | Invoked when a key has been pressed. |
| onKeyReleased | KeyListener | Invoked when a key has been released. |
| onKeyTyped | KeyListener | Invoked when a key has been typed. |
| onMouseClicked | MouseListener | Invoked when the mouse button has been clicked (pressed and released) on a component. |
| onMouseDragged | MouseMotionListener | Invoked when a mouse button is pressed on a component and then dragged. |
| onMouseEntered | MouseListener | Invoked when the mouse enters a component. |
| onMouseExited | MouseListener | Invoked when the mouse exits a component. |
| onMouseMoved | MouseMotionListener | Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed. |
| onMousePressed | MouseListener | Invoked when a mouse button has been pressed on a component. |
| onMouseReleased | MouseListener | Invoked when a mouse button has been released on a component. |
| onMouseWheelMoved | MouseWheelListener | Invoked when the mouse wheel is rotated. |
Bound methods
A bound method is a method whose value can be tracked by listening to events. For instance, changes to the return value of Component.getWidth() are always accompanied by componentResized events.
Bound methods are significant because they allow the data binding system to detect when they have changed. If you call a bound method within a data binding expression, JAXX will add an event listener in order to detect changes to the method's value. Methods which are not listed below cannot be tracked by JAXX's data binding.
delbocnae coracdronpas dronelch cbocboac oroloo
Bound methods inherited from Frame
These methods are bound in all components that descend from java.awt.Frame.
- getTitle()
- isModal()
- isResizable()
- isUndecorated()
delbocnae coracdronpas dronelch cbocboac oroloo
Bound methods inherited from Window
These methods are bound in all components that descend from java.awt.Window.
- getFocusableWindowState()
- getFocusCycleRootAncestor()
- getFocusOwner()
- getFocusTraversalKeys()
- getGraphicsConfiguration()
- getInputContext()
- getLocale()
- getModalExclusionType()
- getMostRecentFocusOwner()
- getOwner()
- getToolkit()
- isFocusableWindow()
- isFocusCycleRoot()
- isActive()
- isAlwaysOnTop()
- isFocused()
- isLocationByPlatform()
- isShowing()
delbocnae coracdronpas dronelch cbocboac oroloo
Bound methods inherited from Container
These methods are bound in all components that descend from java.awt.Container.
- getChildCount()
delbocnae coracdronpas dronelch cbocboac oroloo
Bound methods inherited from Component
These methods are bound in all components that descend from java.awt.Component.
- hasFocus()
- getBackground()
- getBounds()
- getHeight()
- getFont()
- getForeground()
- getLocation()
- getLocationOnScreen()
- getSize()
- getWidth()
- getX()
- getY()
- isFocusable()
- isVisible()

