|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.ui.qt.impl.QtResource<C>
com.sibvisions.rad.ui.qt.impl.QtComponentBase<C>
com.sibvisions.rad.ui.qt.impl.menu.QtMenuItem<C>
C - a QActionpublic class QtMenuItem<C extends QAction>
The QtMenuItem is the IMenuItem
implementation for QT.
QAction,
IMenuItem| Field Summary | |
|---|---|
protected IFactory |
factory
The factory that created this component. |
protected IImage |
image
the image. |
protected IContainer |
parent
Container where the component is added. |
| Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtResource |
|---|
resource |
| Fields inherited from interface javax.rad.ui.IAlignmentConstants |
|---|
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP |
| Fields inherited from interface javax.rad.ui.IAlignmentConstants |
|---|
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP |
| Constructor Summary | |
|---|---|
|
QtMenuItem()
Creates a new instance of QtMenuItem. |
protected |
QtMenuItem(QAction pAction)
Creates a new instance of QtMenuItem for a given QAction. |
| Method Summary | |
|---|---|
IImage |
capture(int pWidth,
int pHeight)
Not supported. |
ActionHandler |
eventAction()
The EventHandler for the action event. |
Key |
getAccelerator()
Returns the Key which serves as an accelerator
for the button. |
String |
getActionCommand()
Returns the command name of the action event fired by this action component. |
IColor |
getBackground()
Not supported. |
IRectangle |
getBounds()
Not supported. |
ICursor |
getCursor()
Not supported. |
IFont |
getFont()
Gets the font of this component. |
IColor |
getForeground()
Not supported. |
int |
getHorizontalAlignment()
Not supported. |
IImage |
getImage()
Returns the default image. |
IPoint |
getLocation()
Not supported. |
IInsets |
getMargins()
Not supported. |
IDimension |
getMaximumSize()
Not supported. |
IDimension |
getMinimumSize()
Not supported. |
String |
getName()
Gets the name of the object. |
IContainer |
getParent()
Gets the parent of this component. |
IDimension |
getPreferredSize()
Not supported. |
IDimension |
getSize()
Not supported. |
String |
getText()
Returns the text string that the label displays. |
String |
getToolTipText()
Returns the tooltip string that has been set with setToolTipText. |
int |
getVerticalAlignment()
Not supported. |
boolean |
isBackgroundSet()
Not supported. |
boolean |
isCursorSet()
Not supported. |
boolean |
isEnabled()
Determines whether this component is enabled. |
boolean |
isFocusable()
Not supported. |
boolean |
isFontSet()
Returns whether the font has been explicitly set for this Component. |
boolean |
isForegroundSet()
Not supported. |
boolean |
isMaximumSizeSet()
Not supported. |
boolean |
isMinimumSizeSet()
Not supported. |
boolean |
isPreferredSizeSet()
Not supported. |
void |
requestFocus()
Not supported. |
void |
setAccelerator(Key pKey)
Sets the key combination which invokes the component's action listeners without selecting. |
void |
setActionCommand(String pActionCommand)
Sets the command name for the action event fired by this action component. |
void |
setBackground(IColor pBackground)
Not supported. |
void |
setBounds(IRectangle pBounds)
Not supported. |
void |
setCursor(ICursor pCursor)
Not supported. |
void |
setEnabled(boolean pEnable)
Enables or disables this component, depending on the value of the parameter pEnable. |
void |
setFocusable(boolean pFocusable)
Not supported. |
void |
setFont(IFont pFont)
Sets the IFont of this component. |
void |
setForeground(IColor pForeground)
Not supported. |
void |
setHorizontalAlignment(int pHorizontalAlignment)
Not supported. |
void |
setImage(IImage pImage)
Sets the default image. |
void |
setLocation(IPoint pLocation)
Not supported. |
void |
setMargins(IInsets pInsets)
Not supported. |
void |
setMaximumSize(IDimension pMaximumSize)
Not supported. |
void |
setMinimumSize(IDimension pMinimumSize)
Not supported. |
void |
setName(String pName)
Sets the name of the object to the specified string. |
void |
setParent(IContainer pParent)
Sets the parent of this component. |
void |
setPreferredSize(IDimension pPreferredSize)
Not supported. |
void |
setResourceVisible(boolean pVisible)
Sets the visibility of the internal resource. |
void |
setSize(IDimension pSize)
Not supported. |
void |
setText(String pText)
Defines the single line of text this component will display. |
void |
setToolTipText(String pText)
Registers the text to display in a tool tip. |
void |
setVerticalAlignment(int pVerticalAlignment)
Not supported. |
void |
triggered()
Handles the triggered action of the menu item resource. |
| Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase |
|---|
eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getFactory, isVisible, setFactory, setVisible |
| Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtResource |
|---|
equals, getResource, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.rad.ui.IComponent |
|---|
eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getFactory, isVisible, setVisible |
| Methods inherited from interface javax.rad.ui.IResource |
|---|
getResource |
| Methods inherited from interface javax.rad.ui.IComponent |
|---|
eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getFactory, isVisible, setVisible |
| Methods inherited from interface javax.rad.ui.IResource |
|---|
getResource |
| Field Detail |
|---|
protected IFactory factory
protected IContainer parent
protected IImage image
| Constructor Detail |
|---|
protected QtMenuItem(QAction pAction)
QtMenuItem for a given QAction.
pAction - the menuitempublic QtMenuItem()
QtMenuItem.
| Method Detail |
|---|
public String getName()
getName in interface IComponentIComponent.setName(java.lang.String)public void setName(String pName)
setName in interface IComponentpName - the string that is to be this
component's nameIComponent.getName()public int getHorizontalAlignment()
getHorizontalAlignment in interface IAlignmentConstantsIAlignmentConstants.getHorizontalAlignment()public void setHorizontalAlignment(int pHorizontalAlignment)
setHorizontalAlignment in interface IAlignmentConstantspHorizontalAlignment - the new vertical alignmentpublic int getVerticalAlignment()
getVerticalAlignment in interface IAlignmentConstantsIAlignmentConstants.getVerticalAlignment()public void setVerticalAlignment(int pVerticalAlignment)
setVerticalAlignment in interface IAlignmentConstantspVerticalAlignment - the new vertical alignmentpublic IDimension getPreferredSize()
getPreferredSize in interface IComponentnullIComponent.getPreferredSize()public void setPreferredSize(IDimension pPreferredSize)
getPreferredSize will always
return this value. Setting the preferred size to null
restores the default behavior.
setPreferredSize in interface IComponentpPreferredSize - the new preferred size, or nullIComponent.getPreferredSize(),
IComponent.isPreferredSizeSet()public boolean isPreferredSizeSet()
isPreferredSizeSet in interface IComponentfalseIComponent.isPreferredSizeSet()public IDimension getMinimumSize()
getMinimumSize in interface IComponentnullIComponent.getMinimumSize()public void setMinimumSize(IDimension pMinimumSize)
getMinimumSize will always
return this value. Setting the minimum size to null
restores the default behavior.
setMinimumSize in interface IComponentpMinimumSize - the new minimum size of this componentIComponent.getMinimumSize(),
IComponent.isMinimumSizeSet()public boolean isMinimumSizeSet()
isMinimumSizeSet in interface IComponentfalseIComponent.isMinimumSizeSet()public IDimension getMaximumSize()
getMaximumSize in interface IComponentnullIComponent.getMaximumSize()public void setMaximumSize(IDimension pMaximumSize)
getMaximumSize will always
return this value. Setting the maximum size to null
restores the default behavior.
setMaximumSize in interface IComponentpMaximumSize - a IDimension containing the
desired maximum allowable sizeIComponent.getMaximumSize(),
IComponent.isMaximumSizeSet()public boolean isMaximumSizeSet()
isMaximumSizeSet in interface IComponentfalseIComponent.isMaximumSizeSet()public IColor getBackground()
getBackground in interface IComponentnullIComponent.getBackground()public void setBackground(IColor pBackground)
The background color affects each component differently and the parts of the component that are affected by the background color may differ between operating systems.
setBackground in interface IComponentpBackground - the color to become this component's color;
if this parameter is null, then this
component will inherit the background color of its parentIComponent.getBackground()public boolean isBackgroundSet()
isBackgroundSet in interface IComponentfalseIComponent.isBackgroundSet()public IColor getForeground()
getForeground in interface IComponentnullIComponent.getForeground()public void setForeground(IColor pForeground)
setForeground in interface IComponentpForeground - the color to become this component's
foreground color; if this parameter is null
then this component will inherit the foreground color of
its parentIComponent.getForeground()public boolean isForegroundSet()
isForegroundSet in interface IComponentfalseIComponent.isBackgroundSet()public ICursor getCursor()
getCursor in interface IComponentnullIComponent.getCursor()public void setCursor(ICursor pCursor)
contains method for
this component returns true for the current cursor location, and
this Component is visible, displayable, and enabled. Setting the
cursor of a Container causes that cursor to be displayed
within all of the container's subcomponents, except for those
that have a non-null cursor.
The method may have no visual effect if the Java platform implementation and/or the native system do not support changing the mouse cursor shape.
setCursor in interface IComponentpCursor - One of the constants defined by the Cursor
class; if this parameter is null then this component
will inherit the cursor of its parentIComponent.isEnabled(),
IComponent.getCursor(),
Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String),
ICursorpublic boolean isCursorSet()
isCursorSet in interface IComponentnullIComponent.isCursorSet()public IFont getFont()
getFont in interface IComponentIComponent.setFont(javax.rad.ui.IFont)public void setFont(IFont pFont)
IFont of this component.
setFont in interface IComponentpFont - the IFont to become this component's font;
if this parameter is null then this
component will inherit the font of its parentIComponent.getFont()public boolean isFontSet()
false, this Component is inheriting its
font from an ancestor.
isFontSet in interface IComponenttrue if the font has been explicitly set for this
Component; false otherwise.public String getToolTipText()
setToolTipText.
getToolTipText in interface IComponentIComponent.setToolTipText(String)public void setToolTipText(String pText)
setToolTipText in interface IComponentpText - the string to display; if the text is null,
the tool tip is turned off for this componentpublic void setFocusable(boolean pFocusable)
setFocusable in interface IComponentpFocusable - indicates whether this Component is focusablepublic boolean isFocusable()
isFocusable in interface IComponentfalseIComponent.isFocusable()public void requestFocus()
This method cannot be used to set the focus owner to no Component at
all. Use KeyboardFocusManager.clearGlobalFocusOwner()
instead.
Because the focus behavior of this method is platform-dependent,
developers are strongly encouraged to use
requestFocusInWindow when possible.
requestFocus in interface IComponentpublic IContainer getParent()
getParent in interface IComponentpublic void setParent(IContainer pParent)
setParent in interface IComponentpParent - the parent container of this componentpublic boolean isEnabled()
setEnabled method.
isEnabled in interface IComponenttrue if the component is enabled, false otherwiseIComponent.setEnabled(boolean)public void setEnabled(boolean pEnable)
pEnable. An enabled component can respond to user
input and generate events. Components are enabled initially by default.
setEnabled in interface IComponentpEnable - if true, this component is
enabled; otherwise this component is disabledIComponent.isEnabled()public IPoint getLocation()
getLocation in interface IComponentnullIComponent.getLocation()public void setLocation(IPoint pLocation)
p. Point
p is given in the parent's coordinate space.
setLocation in interface IComponentpLocation - the point defining the top-left corner
of the new location, given in the coordinate space of this
component's parentIComponent.getLocation(),
IComponent.setBounds(IRectangle)public IDimension getSize()
getSize in interface IComponentnullIComponent.getSize()public void setSize(IDimension pSize)
d.width
and height d.height.
setSize in interface IComponentpSize - the IDimension specifying the new size
of this componentIComponent.setSize(javax.rad.ui.IDimension),
IComponent.setBounds(javax.rad.ui.IRectangle)public IRectangle getBounds()
getBounds in interface IComponentnullIComponent.getBounds()public void setBounds(IRectangle pBounds)
pBounds. This component's new
position is specified by pBounds.x and pBounds.y,
and its new size is specified by pBounds.width and
pBounds.height
setBounds in interface IComponentpBounds - the new bounding rectangle for this componentIComponent.getBounds(),
IComponent.setLocation(IPoint),
IComponent.setSize(IDimension)
public IImage capture(int pWidth,
int pHeight)
capture in interface IComponentpWidth - the expected widthpHeight - the expected height
nullIComponent.capture(int, int)public void setAccelerator(Key pKey)
setAccelerator in interface IActionComponentpKey - the Key which will serve as an acceleratorpublic Key getAccelerator()
Key which serves as an accelerator
for the button.
getAccelerator in interface IActionComponentKey object identifying the accelerator keypublic void setActionCommand(String pActionCommand)
setActionCommand in interface IActionComponentpActionCommand - a string used to set the action command.
If the string is null then the action command
is set to match the text of the action component.ActionEventpublic String getActionCommand()
null (default) then this method
returns the label of the button.
getActionCommand in interface IActionComponentpublic void setImage(IImage pImage)
setImage in interface IIconpImage - the imageIIcon.getImage()public IImage getImage()
getImage in interface IIconIIcon.setImage(IImage)public void setText(String pText)
setText in interface ILabelpText - the textpublic String getText()
getText in interface ILabelILabel.setText(java.lang.String)public ActionHandler eventAction()
eventAction in interface IActionComponentpublic void setMargins(IInsets pInsets)
null will cause the action component to
use the default margin.
setMargins in interface IActionComponentpInsets - the space between the border and the testpublic IInsets getMargins()
getMargins in interface IActionComponentIInsets object specifying the margin
between the component's border and the textIActionComponent.setMargins(IInsets)public void setResourceVisible(boolean pVisible)
setResourceVisible in class QtComponentBase<C extends QAction>pVisible - true to set visible, otherwise falsepublic void triggered()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||