public class AddAttributeButtonVP extends MenuButtonVP
StyledElementViewPart.Role
menuAtLeft, role, selectElement, view
BOTTOM, disabledIcon, icon, iconHeight, iconWidth, LEFT, RIGHT, state, toolTip, TOP
DEFAULT_STYLE, style
Constructor and Description |
---|
AddAttributeButtonVP(Style style,
StyledElementView view,
StyledElementViewPart.Role role,
boolean useDefaultValue) |
Modifier and Type | Method and Description |
---|---|
CommandResult |
executeCommand(Gadget self,
String parameter,
int x,
int y)
Actually executes this command with specified parameter and in
specified context.
|
CommandMenu |
getMenu() |
static String[] |
getMenuItems(DocumentView docView,
Element element) |
createMenu, getCommand, getCommandParameter, hasCommand, hasMenu, prepareCommand, setCommand, setCommandParameter, setMenu
detachingViewFromModel, getCommand, getElementView, getMenuAtLeft, getRole, getStyledElementView, getView, grabsMouseButton, handleMouseEvent, 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, handleAppEvent, handleKeyEvent, hasFocus, isAppEventHandler, 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 AddAttributeButtonVP(Style style, StyledElementView view, StyledElementViewPart.Role role, boolean useDefaultValue)
public CommandMenu getMenu()
getMenu
in class ButtonBaseVP
public static String[] getMenuItems(DocumentView docView, Element element)
public CommandResult executeCommand(Gadget self, String parameter, int x, int y)
Command
This method assumes that Command.prepareCommand(com.xmlmind.xmledit.gadget.Gadget, java.lang.String, int, int)
has been
successfully invoked immediately before its own invocation.
self
- the target of this commandparameter
- parameterizes the command (that is, modifies the
behavior of the command in a command specific way)x
- X position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputy
- Y position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputnull