com.sibvisions.rad.ui.qt.impl.component
Class QtButton

java.lang.Object
  extended by com.sibvisions.rad.ui.qt.impl.QtResource<C>
      extended by com.sibvisions.rad.ui.qt.impl.QtComponentBase<C>
          extended by com.sibvisions.rad.ui.qt.impl.QtComponent<B>
              extended by com.sibvisions.rad.ui.qt.impl.component.QtAbstractButton<QVxButton>
                  extended by com.sibvisions.rad.ui.qt.impl.component.QtButton
All Implemented Interfaces:
IActionComponent, IButton, IIcon, ILabel, IToggleActionComponent, IToggleButton, IAlignmentConstants, IComponent, IResource

public class QtButton
extends QtAbstractButton<QVxButton>

The QtButton is the IButton implementation for QT.

See Also:
QPushButton, IButton

Field Summary
protected  IImage imgOver
          the mouse over image.
protected  IImage imgPressed
          the mouse pressed image.
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.component.QtAbstractButton
image, imagePressed
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent
parent
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase
factory
 
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
 
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
QtButton()
          Creates a new instance of QtButton.
 
Method Summary
 int getImageTextGap()
          Returns the amount of space between the text and the icon displayed in this button.
 IImage getMouseOverImage()
          Gets the image for the button when the mouse is over.
 IImage getPressedImage()
          Gets the image for the button when the button is pressed.
 boolean isBorderPainted()
          Gets whether the border will be painted.
 void setBorderPainted(boolean pBorderPainted)
          Sets whether the border will be painted. If true, the border will be painted. The default value is that the border will be painted.
 void setImageTextGap(int pGap)
          If both the icon and text properties are set, this property defines the space between them.

The default value of this property is 4 pixels.

This is a JavaBeans bound property.

 void setMouseOverImage(IImage pImage)
          Sets the image for the button when the mouse is over.
 void setPressedImage(IImage pImage)
          Sets the image for the button when the button is pressed.
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.component.QtAbstractButton
clicked, eventAction, getAccelerator, getActionCommand, getHorizontalTextPosition, getImage, getMargins, getText, getVerticalTextPosition, isBorderOnMouseEntered, isDefaultButton, isSelected, setAccelerator, setActionCommand, setBorderOnMouseEntered, setDefaultButton, setHorizontalAlignment, setHorizontalTextPosition, setImage, setMargins, setSelected, setText, setVerticalAlignment, setVerticalTextPosition, toggled
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent
addStyle, capture, getBackground, getBounds, getCursor, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getStyleSheet, getToolTipText, getVerticalAlignment, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setResourceVisible, setSize, setToolTipText
 
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
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.IAlignmentConstants
getHorizontalAlignment, getVerticalAlignment
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.IAlignmentConstants
getHorizontalAlignment, getVerticalAlignment
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.IAlignmentConstants
getHorizontalAlignment, getVerticalAlignment
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.IAlignmentConstants
getHorizontalAlignment, getVerticalAlignment
 

Field Detail

imgOver

protected IImage imgOver
the mouse over image.


imgPressed

protected IImage imgPressed
the mouse pressed image.

Constructor Detail

QtButton

public QtButton()
Creates a new instance of QtButton.

Method Detail

setImageTextGap

public void setImageTextGap(int pGap)
If both the icon and text properties are set, this property defines the space between them.

The default value of this property is 4 pixels.

This is a JavaBeans bound property.

Specified by:
setImageTextGap in interface IButton
Overrides:
setImageTextGap in class QtAbstractButton<QVxButton>
Parameters:
pGap - the image gap
See Also:
IButton.getImageTextGap()

getImageTextGap

public int getImageTextGap()
Returns the amount of space between the text and the icon displayed in this button.

Specified by:
getImageTextGap in interface IButton
Overrides:
getImageTextGap in class QtAbstractButton<QVxButton>
Returns:
an int equal to the number of pixels between the text and the icon.
See Also:
IButton.setImageTextGap(int)

setBorderPainted

public void setBorderPainted(boolean pBorderPainted)
Sets whether the border will be painted. If true, the border will be painted. The default value is that the border will be painted.

Specified by:
setBorderPainted in interface IButton
Overrides:
setBorderPainted in class QtAbstractButton<QVxButton>
Parameters:
pBorderPainted - true to paint the border, otherwise false

isBorderPainted

public boolean isBorderPainted()
Gets whether the border will be painted.

Specified by:
isBorderPainted in interface IButton
Overrides:
isBorderPainted in class QtAbstractButton<QVxButton>
Returns:
true when the border will be painted, otherwise false

setMouseOverImage

public void setMouseOverImage(IImage pImage)
Sets the image for the button when the mouse is over.

Specified by:
setMouseOverImage in interface IButton
Overrides:
setMouseOverImage in class QtAbstractButton<QVxButton>
Parameters:
pImage - the mouse over image

getMouseOverImage

public IImage getMouseOverImage()
Gets the image for the button when the mouse is over.

Specified by:
getMouseOverImage in interface IButton
Overrides:
getMouseOverImage in class QtAbstractButton<QVxButton>
Returns:
the mouse over image

setPressedImage

public void setPressedImage(IImage pImage)
Sets the image for the button when the button is pressed.

Specified by:
setPressedImage in interface IButton
Specified by:
setPressedImage in interface IToggleActionComponent
Overrides:
setPressedImage in class QtAbstractButton<QVxButton>
Parameters:
pImage - the mouse pressed image

getPressedImage

public IImage getPressedImage()
Gets the image for the button when the button is pressed.

Specified by:
getPressedImage in interface IButton
Specified by:
getPressedImage in interface IToggleActionComponent
Overrides:
getPressedImage in class QtAbstractButton<QVxButton>
Returns:
the mouse pressed image


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.