public class VButton extends VControl
VControl.Type
Modifier and Type | Field and Description |
---|---|
(package private) org.eclipse.swt.graphics.Color |
defaultHoverBackgroundColor |
(package private) org.eclipse.swt.graphics.Color |
defaultHoverBorderColor |
(package private) org.eclipse.swt.graphics.Color |
defaultSelectedBackgroundColor |
(package private) org.eclipse.swt.graphics.Color |
defaultSelectedBorderColor |
(package private) org.eclipse.swt.graphics.Color |
hoverBackgroundColor |
(package private) org.eclipse.swt.graphics.Color |
hoverBorderColor |
(package private) org.eclipse.swt.graphics.ImageData |
oldImageData |
(package private) boolean |
paintInactive |
(package private) boolean |
paintNative |
(package private) org.eclipse.swt.graphics.Color |
selectedBackgroundColor |
(package private) org.eclipse.swt.graphics.Color |
selectedBorderColor |
background, bounds, carbon, composite, customToolTip, dataMap, disposed, fill, font, foreground, gtk, image, layoutData, listeners, marginBottom, marginLeft, marginRight, marginTop, menu, painter, parent, points, scaleImage, square, STATE_ACTIVE, STATE_ENABLED, STATE_MOUSE_DOWN, STATE_SELECTED, svg, text, tooltipText, visibility, win32, xAlign, yAlign
Constructor and Description |
---|
VButton(VPanel panel,
int style)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected void |
filterEvent(org.eclipse.swt.widgets.Event event) |
boolean |
getNativeBackground() |
boolean |
getSelection() |
VControl.Type |
getType() |
void |
setHoverBackgroundColor(org.eclipse.swt.graphics.Color hoverBackgroundColor)
Set the background color when the mouse is hover the button
|
void |
setHoverBorderColor(org.eclipse.swt.graphics.Color hoverBorderColor)
border color when the mouse is hover the button
|
void |
setPaintInactive(boolean paintInactive) |
void |
setPaintNative(boolean paintNative)
Setting this value currently does nothing but subclasses can take
advantage of this flag.
|
void |
setSelectedBackgroundColor(org.eclipse.swt.graphics.Color selectedBackgroundColor)
background color when the button is selected
|
void |
setSelectedBorderColor(org.eclipse.swt.graphics.Color selectedBorderColor)
background color when the button is selected
|
void |
setSelection(boolean select)
Marks this button as being "selected" by the user.
|
activate, addListener, addListener, attachListeners, computeSize, computeSize, containsControl, createMenu, deactivate, detachListeners, getBackground, getBounds, getClientArea, getClientSize, getComposite, getControl, getData, getData, getData, getData, getDisplay, getEnabled, getFont, getForeground, getImage, getLayoutData, getListeners, getLocation, getMargins, getMenu, getParent, getShell, getSize, getState, getStyle, getText, getToolTipText, getVisibility, getVisible, getWidget, handleEvent, hasState, hasStyle, isActivatable, isDisposed, isEnabled, isSameWidgetAs, isSameWidgetAs, isSquare, isVisible, moveAbove, moveBelow, notifyListeners, notifyListeners, paintControl, redraw, redrawOnActivate, redrawOnDeactivate, removeListener, removeListener, setActivatable, setActiveCursor, setAlignment, setAlpha, setAlpha, setBackground, setBounds, setBounds, setCursor, setData, setData, setEnabled, setFill, setFocus, setFocus, setFont, setForeground, setImage, setImage, setInactiveCursor, setLayoutData, setLocation, setLocation, setMargins, setMargins, setMargins, setOval, setOval, setPainter, setParent, setPolygon, setPolygon, setScaleImage, setSize, setSquare, setState, setStyle, setStyle, setText, setToolTipText, setVisibility, setVisible, setVisible, setVisible, toControl, toControl, toDisplay, toDisplay, toString, update
org.eclipse.swt.graphics.ImageData oldImageData
boolean paintNative
boolean paintInactive
org.eclipse.swt.graphics.Color hoverBackgroundColor
org.eclipse.swt.graphics.Color defaultHoverBackgroundColor
org.eclipse.swt.graphics.Color hoverBorderColor
org.eclipse.swt.graphics.Color defaultHoverBorderColor
org.eclipse.swt.graphics.Color selectedBackgroundColor
org.eclipse.swt.graphics.Color defaultSelectedBackgroundColor
org.eclipse.swt.graphics.Color selectedBorderColor
org.eclipse.swt.graphics.Color defaultSelectedBorderColor
public VButton(VPanel panel, int style)
panel
- parent panelstyle
- button stylepublic boolean getNativeBackground()
setPaintNative(boolean)
public boolean getSelection()
public VControl.Type getType()
protected void filterEvent(org.eclipse.swt.widgets.Event event)
filterEvent
in class VControl
public void setPaintInactive(boolean paintInactive)
paintInactive
- true to paint the button in an inactive state.public void setPaintNative(boolean paintNative)
paintNative
- true to paint nativepublic void setSelection(boolean select)
select
- true to make the button "selected".public void setHoverBackgroundColor(org.eclipse.swt.graphics.Color hoverBackgroundColor)
hoverBackgroundColor
- new colorpublic void setHoverBorderColor(org.eclipse.swt.graphics.Color hoverBorderColor)
hoverBorderColor
- new colorpublic void setSelectedBackgroundColor(org.eclipse.swt.graphics.Color selectedBackgroundColor)
selectedBackgroundColor
- new colorpublic void setSelectedBorderColor(org.eclipse.swt.graphics.Color selectedBorderColor)
selectedBorderColor
- new color