public class DragSourceVP extends ButtonBaseVP
StyledElementViewPart.Role
menuAtLeft, role, selectElement, view
BOTTOM, disabledIcon, icon, iconHeight, iconWidth, LEFT, RIGHT, state, toolTip, TOP
DEFAULT_STYLE, style
Constructor and Description |
---|
DragSourceVP(Style style,
StyledElementView view,
StyledElementViewPart.Role role) |
Modifier and Type | Method and Description |
---|---|
Command |
getCommand() |
String |
getCommandParameter() |
CommandMenu |
getMenu() |
boolean |
grabsMouseButton(MouseEvent e)
Invoked by EventDispatcher to know if this gadget has an action
triggered by mouse button+modifiers of specified mouse event.
|
Object |
handleAppEvent(AppEvent e)
Invoked by the application to request this gadget to handle specified
application event.
|
void |
handleMouseEvent(MouseEvent e)
Invoked by EventDispatcher to request this gadget to handle specified
mouse event.
|
boolean |
hasCommand() |
boolean |
hasMenu() |
boolean |
isAppEventHandler(AppEvent e)
Invoked by the application to know if this gadget has an action
triggered by specified application event.
|
void |
setCommand(Command command) |
void |
setCommandParameter(String commandParameter) |
void |
setMenu(CommandMenu menu) |
detachingViewFromModel, getCommand, getElementView, getMenuAtLeft, getRole, getStyledElementView, getView, isElementSelected, reportCommandError, selectElement, selectElement, setElementSelected, setMenuAtLeft
doAction, getFirstBaseLine, getIcon, getIconGap, getIconPosition, getLastBaseLine, getToolTip, hasIcon, hasText, isEnabled, isPressed, layoutContent, paintContent, setEnabled, setIcon, setIconGap, setIconPosition, setPressed, setToolTip
doLayoutContent, doPaintContent, getText, setText
refresh
drawBorder, drawBox, drawEmptyContent, drawEmptyTextContent, getContentSizeConstraints, getEmptyContentSize, getEmptyContentSize, getMarginBottom, getMarginTop, getStyle, hasDynamicVerticalMargins, layout, paint, setStyle
focusGained, focusLost, gadgetToPanel, gadgetToRoot, getAncestors, getBounds, getBounds, getCursor, getEventDispatcher, getFontMetrics, getGadgetPanel, getGraphics, getLocation, getLocation, getNonBreakableVerticalRanges, getRoot, getSize, getSize, getToolkit, handleKeyEvent, hasFocus, layout, makeRectangleVisible, makeRectangleVisible, panelToGadget, print, relayout, relayout, repaint, repaint, requestFocus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMarginBottom, getMarginTop, getStyle, hasDynamicVerticalMargins
public DragSourceVP(Style style, StyledElementView view, StyledElementViewPart.Role role)
public boolean hasCommand()
hasCommand
in class ButtonBaseVP
public void setCommand(Command command)
setCommand
in class ButtonBaseVP
public Command getCommand()
getCommand
in class ButtonBaseVP
public void setCommandParameter(String commandParameter)
setCommandParameter
in class ButtonBaseVP
public String getCommandParameter()
getCommandParameter
in class ButtonBaseVP
public boolean hasMenu()
hasMenu
in class ButtonBaseVP
public void setMenu(CommandMenu menu)
setMenu
in class ButtonBaseVP
public CommandMenu getMenu()
getMenu
in class ButtonBaseVP
public boolean grabsMouseButton(MouseEvent e)
Gadget
The type of mouse event (CLICKED, PRESSED, DRAGGED, etc) is not
relevant here. If a gadget ``grabs'' Shift+mouse button 1, it will
receive all the following mouse events: PRESSED, DRAGGED,
RELEASED, CLICKED, etc, through Gadget.handleMouseEvent(java.awt.event.MouseEvent)
.
grabsMouseButton
in class ButtonBaseVP
public void handleMouseEvent(MouseEvent e)
Gadget
handleMouseEvent
in class ButtonBaseVP
public boolean isAppEventHandler(AppEvent e)
Gadget
isAppEventHandler
in class Gadget
public Object handleAppEvent(AppEvent e)
Gadget
This gadget may return a result after handling specified application event. This result, if any, is specific to the type of the application event and therefore cannot be described here.
handleAppEvent
in class Gadget