Overview
An implementation of a menu -- a popup window containing MenuItems.
Attribute Summary
| name | type | description |
|---|---|---|
| Public | ||
| items | MenuItem[] |
Defines the array of MenuItems objects
to be displayed by this Defines the array of MenuItems objects
to be displayed by this |
| Protected | ||
Inherited Attributes
javafx.ext.swing.AbstractButton
| name | type | description |
|---|---|---|
| action | function():Void |
Represents the button's action. More: [+]Represents the button's action. |
| horizontalAlignment | HorizontalAlignment |
Represents the horizontal alignment of the text and icon. More: [+]Represents the horizontal alignment of the text and icon. |
| horizontalTextPosition | HorizontalAlignment |
Represents the horizontal position of the text relative to the icon. More: [+]Represents the horizontal position of the text relative to the icon. |
| icon | Icon |
Represents the button's icon. More: [+]Represents the button's icon. |
| pressedIcon | Icon |
Represents the button's pressed icon. More: [+]Represents the button's pressed icon. |
| text | String |
Represents the button's text. More: [+]Represents the button's text. |
| verticalAlignment | VerticalAlignment |
Represents the vertical alignment of the text and icon. More: [+]Represents the vertical alignment of the text and icon. |
| verticalTextPosition | VerticalAlignment |
Represents the vertical position of the text relative to the icon. More: [+]Represents the vertical position of the text relative to the icon. |
javafx.ext.swing.Component
| name | type | description |
|---|---|---|
| enabled | Boolean |
Sets whether or not this component is enabled. More: [+]Sets whether or not this component is enabled. A component that is enabled may respond to user input, while a component that is not enabled cannot respond to user input. Some components may alter their visual representation when they are disabled in order to provide feedback to the user that they cannot take input. Note: Disabling a component does not disable it's children. Note: Disabling a lightweight component does not prevent it from receiving MouseEvents |
| font | Font |
Sets the font for this component. More: [+]Sets the font for this component. |
| foreground | Color |
Sets the foreground color of this component. More: [+]Sets the foreground color of this component. |
| halign | Alignment | More: [+] |
| height | Integer |
Sets the height of the component. More: [+]Sets the height of the component. The default value isnull.
|
| hisbaseline | Boolean | More: [+] |
| hmax | Integer | More: [+] |
| hmin | Integer | More: [+] |
| hpref | Integer | More: [+] |
| name | String |
The component's name, which may be The component's name, which may be |
| preferredSize | Integer[] |
The The |
| valign | Alignment | More: [+] |
| visbaseline | Boolean | More: [+] |
| visible | Boolean |
Makes the component visible or invisible. More: [+]Makes the component visible or invisible. |
| vmax | Integer | More: [+] |
| vmin | Integer | More: [+] |
| vpref | Integer | More: [+] |
| width | Integer |
Sets the width of the component. More: [+]Sets the width of the component. The default value isnull.
|
| x | Integer |
Defines the X coordinate of the component. More: [+]Defines the X coordinate of the component. The default value isnull.
|
| y | Integer |
Defines the Y coordinate of the component. More: [+]Defines the Y coordinate of the component. The default value isnull.
|
Function Summary
- public getJMenu() : javax.swing.JMenu
-
Returns the JMenu delegate for this component.
More: [+]Returns the JMenu delegate for this component.
-
Returns
- JMenu
- protected remove(component: Component) : Void
-
More: [+]Called when a
Componentis being reparented to notify its oldContainerthat it is to be removed.-
Parameters
- component
Inherited Functions
javafx.ext.swing.MenuItem
- protected createAbstractButton() : javax.swing.AbstractButton
-
Creates the specific javax.swing.AbstractButton delegate for this component.
More: [+]Creates the specific javax.swing.AbstractButton delegate for this component.
-
Returns
- AbstractButton
- public getJMenuItem() : javax.swing.JMenuItem
-
Returns the JMenuItem delegate for this component.
More: [+]Returns the JMenuItem delegate for this component.
-
Returns
- JMenuItem
javafx.ext.swing.AbstractButton
- protected createJComponent() : javax.swing.JComponent
-
Creates the
More: [+]JComponentdelegate for this component.Creates the
JComponentdelegate for this component.-
Returns
- JComponent
- public getAbstractButton() : javax.swing.AbstractButton
-
Returns the
More: [+]AbstractButtondelegate for this component.Returns the
AbstractButtondelegate for this component.-
Returns
- AbstractButton
javafx.ext.swing.Component
- protected abstract createJComponent() : javax.swing.JComponent
-
Creates the JComponent delegate for this component.
More: [+]Creates the JComponent delegate for this component.
-
Returns
- JComponent
- public static fromJComponent(jComponent: javax.swing.JComponent) : Component
-
Get the size and location values from the component.
More: [+]Get the size and location values from the component.
-
Parameters
- jComponent
-
Returns
- Component
- public static getComponentFor(jComponent: javax.swing.JComponent) : Component
-
Determines if this component or one of its immediate subcomponents is an object of the property with the specified key, and if so, returns the containing component.
More: [+]Determines if this component or one of its immediate subcomponents is an object of the property with the specified key, and if so, returns the containing component.
-
Parameters
- jComponent
-
Returns
- Component
- public getJComponent() : javax.swing.JComponent
-
Returns the Swing
More: [+]JComponentencapsulated by thisComponent.Returns the Swing
JComponentencapsulated by thisComponent. Never returnsnull.See again Also:
#getRootJComponent(),-
Returns
- JComponent
-
the Swing
JComponentencapsulated by thisComponent
- public bound getName() : java.lang.String
-
Returns this
More: [+]Component'sname, ornullif it doesn't have a name.Returns this
Component'sname, ornullif it doesn't have a name.See again Also:
#name,-
Returns
- String
-
this
Component'sname ornull
- public bound getParent() : Container
-
Returns this
More: [+]Component'sparentContainer, ornullif it doesn't have a parent.Returns this
Component'sparentContainer, ornullif it doesn't have a parent.-
Returns
- Container
-
this
Component'sparent ornull
- public getRootJComponent() : javax.swing.JComponent
-
Some
More: [+]Componentimplementations are backed by a hierarchy of SwingJComponentsrather than a singleJComponent.Some
Componentimplementations are backed by a hierarchy of SwingJComponentsrather than a singleJComponent. This method returns the topJComponentin the hierarchy, the one which is to be used to embed thisComponentin an underlying Swing scene graph or hierarchy. This is also theJComponenton which thex, y, width, heightattributes operate.This method must never return
null, even during initialization.The default implementation delegates to #getJComponent().
-
Returns
- JComponent
-
the root
JComponent
javafx.ext.swing.Container
- public abstract bound getName() : java.lang.String
-
Returns this
More: [+]Container'sname, ornullif it doesn't have a name.Returns this
Container'sname, ornullif it doesn't have a name.-
Returns
- String
-
this
Container'sname ornull
- public abstract bound getParent() : Container
-
Returns this
More: [+]Container'sparentContainer, ornullif it doesn't have a parent.Returns this
Container'sparentContainer, ornullif it doesn't have a parent.-
Returns
- Container
-
this
Container'sparent ornull
- protected parentToThisContainer(component: Component) : Void
-
Parents the given
More: [+]Componentto thisContainer.Parents the given
Componentto thisContainer. First, unparents theComponentfrom its currentContainer, if any, by callingremove(component). Then sets theComponent'sparent to this. Does nothing if the parameter isnullor is already parented to thisContainer.-
Parameters
- component
-
the component to parent to this
Container
- protected abstract remove(component: Component) : Void
-
Called when a
More: [+]Componentis being reparented to notify its oldContainerthat it is to be removed.Called when a
Componentis being reparented to notify its oldContainerthat it is to be removed.-
Parameters
- component
-
the
Componentto remove
- protected unparentFromThisContainer(component: Component) : Void
-
Unparents the given
More: [+]Componentfrom thisContainer.Unparents the given
Componentfrom thisContainer. If the givenComponentis currently parented to thisContainer, sets theComponent'sparent tonull. Otherwise, does nothing. Does nothing if the parameter isnull.-
Parameters
- component
-
the component to unparent from this
Container