class BrowsePopupMenu extends MenuGuiImpl
Menu.PopupKeyListener
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
log
Logger.
|
private static int |
MAX_FONT_SIZE
Maximum size of the font allowed for selection.
|
private static int |
MIN_FONT_SIZE
Minimum size of the font allowed for selection.
|
location, mousePtr, nativeInsets, physicalLocation
Modifier | Constructor and Description |
---|---|
private |
BrowsePopupMenu(Browse browse)
Constructs a popup menu.
|
Modifier and Type | Method and Description |
---|---|
static BrowsePopupMenu |
create(BrowseGuiImpl browse,
BrowseColumnGuiImpl column,
boolean promptColumn)
Create a popup menu for the given browse.
|
private static MenuItemGuiImpl |
createExportMenuItem(Browse browse,
MediaType outputFormat)
Create menu item that calls export to the specified format.
|
private static SubMenuGuiImpl |
createSelectResetSubmenu(java.lang.String submenuTitle,
java.awt.event.MouseAdapter selectAdapter,
java.awt.event.MouseAdapter resetAdapter,
boolean usePrompt)
Create "Select/Reset" submenu.
|
private static MenuItemGuiImpl |
createSeparatorsItem(BrowseGuiImpl browse,
EnhancedBrowseParameter param)
Create menu item for switching on/off rows/column/all separators.
|
private static void |
eventDrawingBracket(Widget<?> widget,
java.lang.Runnable code)
Convenience wrapper for
ThinClient.eventDrawingBracket(Widget, Runnable) . |
private static SubMenuGuiImpl |
getBrowseColorChangeSubmenu(BrowseGuiImpl browse,
EnhancedBrowseParameter param,
java.lang.String submenuTitle)
Create a "Select/Reset" submenu that calls color change dialog for the browse or
resets the color.
|
private static SubMenuGuiImpl |
getBrowseFontChangeSubmenu(BrowseGuiImpl browse,
EnhancedBrowseParameter param,
java.lang.String submenuTitle)
Create a "Select/Reset" submenu that calls font change dialog for the browse or
resets the color.
|
private static SubMenuGuiImpl |
getColumnColorChangeSubmenu(BrowseGuiImpl browse,
BrowseColumnGuiImpl targetColumn,
EnhancedBrowseParameter param,
java.lang.String submenuTitle)
Create a "Select/Reset" submenu that calls color change dialog for the browse column or
resets the color.
|
private static SubMenuGuiImpl |
getColumnFontChangeSubmenu(BrowseGuiImpl browse,
BrowseColumnGuiImpl targetColumn,
EnhancedBrowseParameter param,
java.lang.String submenuTitle)
Create a "Select/Reset" submenu that calls font change dialog for the browse column or
resets the color.
|
private static java.lang.String |
getColumnLabel(BrowseColumnGuiImpl column)
Get a formatted name to represent the column label.
|
private static SubMenuGuiImpl |
getReportTitleChangeSubmenu(BrowseGuiImpl browse)
Create a "Set/Reset" submenu that calls Report Title change dialog for the browse or
resets the title.
|
private static java.awt.event.MouseAdapter |
getResetTargetAdapter(BrowseGuiImpl browse,
EnhancedBrowseSaveTarget resetTarget)
Get mouse adapter which resets the enhanced browse configuration at the specified
level of configurations.
|
private static java.awt.event.MouseAdapter |
getSaveTargetAdapter(BrowseGuiImpl browse,
EnhancedBrowseSaveTarget saveTarget)
Get mouse adapter which saves the enhanced browse configuration into the specified save
target.
|
private static java.lang.String |
getSaveTargetDescription(EnhancedBrowseSaveTarget saveTarget)
Get description of the specified save target.
|
private static BrowseColumnGuiImpl |
resolveColumn(BrowseGuiImpl browse,
BrowseColumnGuiImpl column,
boolean visible)
Query the user for a column if it is not known.
|
clearItemsHighlight, doLayout, doShowPopup, draw, findMenuMouseSource, findMouseSource, getFirstEnabledWidget, getFirstFocusableItem, getLastFocusableItem, getMouseWidgets, height, hide, initialize, isLegacyFocus, isMnemonicsOn, leaveMenu, mouseActions, mouseClicked, processAccelerator, processKeyEvent, setMnemonicsOn, setVisible, width
afterConfigUpdate, config, currentFocus, destroy, enterMenu, focusWorker, getMenu, getTabItemList, hasFocus, hasMenuFocus, isMenubarElement, processKeyAccelerator, setMenuClosedHandler, showPopup, triggerMenuClosed
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, cycleFocus, defaultFocus, deregisterSelectedWidget, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, firstFocus, focus, focusTraversable, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, hasFocusable, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, reflectAncestorChange, reflectLocationChange, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, requestFocus, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unregisterWidgetStateListener, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
widgetsAsList
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hidden, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isDirectManipulable, isDirectManipulationActive, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetStateListener, repaint, repaint, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unregisterWidgetStateListener, validateDisplayValue, window
private static java.util.logging.Logger log
private static final int MIN_FONT_SIZE
private static final int MAX_FONT_SIZE
private BrowsePopupMenu(Browse browse)
browse
- Parent browse.public static BrowsePopupMenu create(BrowseGuiImpl browse, BrowseColumnGuiImpl column, boolean promptColumn)
browse
- Parent browse.column
- Column which was right-clicked, or null
if the right click was
performed outside of the columns area.promptColumn
- true
if this should prompt for a column in case the column is unknown;
otherwise, the column-specific actions will be invisibleprivate static MenuItemGuiImpl createExportMenuItem(Browse browse, MediaType outputFormat)
browse
- Parent browse.outputFormat
- Report output format.private static SubMenuGuiImpl getColumnColorChangeSubmenu(BrowseGuiImpl browse, BrowseColumnGuiImpl targetColumn, EnhancedBrowseParameter param, java.lang.String submenuTitle)
browse
- The browse which contains the column.targetColumn
- Target browse column.param
- Parameter which specifies which type of color should be changed: can be
EnhancedBrowseParameter.FG_COLOR
, EnhancedBrowseParameter.BG_COLOR
,
EnhancedBrowseParameter.LABEL_FG_COLOR
,
EnhancedBrowseParameter.LABEL_BG_COLOR
or
EnhancedBrowseParameter.ALTERNATING_BG_COLOR
.submenuTitle
- Submenu title.private static SubMenuGuiImpl getBrowseColorChangeSubmenu(BrowseGuiImpl browse, EnhancedBrowseParameter param, java.lang.String submenuTitle)
browse
- Target browse.param
- Parameter which specifies which type of color should be changed: can be
EnhancedBrowseParameter.FG_COLOR
, EnhancedBrowseParameter.BG_COLOR
,
EnhancedBrowseParameter.LABEL_FG_COLOR
,
EnhancedBrowseParameter.LABEL_BG_COLOR
,
EnhancedBrowseParameter.SEPARATORS_COLOR
or
EnhancedBrowseParameter.ALTERNATING_BG_COLOR
.submenuTitle
- Submenu title.private static SubMenuGuiImpl getColumnFontChangeSubmenu(BrowseGuiImpl browse, BrowseColumnGuiImpl targetColumn, EnhancedBrowseParameter param, java.lang.String submenuTitle)
browse
- The browse which contains the column.targetColumn
- Target browse column.param
- Parameter which specifies which type of font should be changed: can be
EnhancedBrowseParameter.CELLS_FONT
or
EnhancedBrowseParameter.LABEL_FONT
.submenuTitle
- Submenu title.private static SubMenuGuiImpl getBrowseFontChangeSubmenu(BrowseGuiImpl browse, EnhancedBrowseParameter param, java.lang.String submenuTitle)
browse
- Target browse.param
- Parameter which specifies which type of font should be changed: can be
EnhancedBrowseParameter.CELLS_FONT
or
EnhancedBrowseParameter.LABEL_FONT
.submenuTitle
- Submenu title.private static SubMenuGuiImpl getReportTitleChangeSubmenu(BrowseGuiImpl browse)
browse
- Target browse.private static MenuItemGuiImpl createSeparatorsItem(BrowseGuiImpl browse, EnhancedBrowseParameter param)
browse
- Parent browse.param
- Parameter which specifies which type of separators should be changed: can be
EnhancedBrowseParameter.SEPARATORS
or
EnhancedBrowseParameter.ROW_SEPARATORS
or
EnhancedBrowseParameter.COLUMN_SEPARATORS
.private static java.awt.event.MouseAdapter getSaveTargetAdapter(BrowseGuiImpl browse, EnhancedBrowseSaveTarget saveTarget)
browse
- Target browse.saveTarget
- Save target (if configuration is applied to "all browses" / "specific browse" and
"all users" / "current user").private static java.awt.event.MouseAdapter getResetTargetAdapter(BrowseGuiImpl browse, EnhancedBrowseSaveTarget resetTarget)
browse
- Target browse.resetTarget
- Reset target (if configuration is reset for "all browses" / "specific browse" and
"all users" / "current user").private static java.lang.String getSaveTargetDescription(EnhancedBrowseSaveTarget saveTarget)
saveTarget
- Save target (target server, target account, applied to all browses or not).private static void eventDrawingBracket(Widget<?> widget, java.lang.Runnable code)
ThinClient.eventDrawingBracket(Widget, Runnable)
.widget
- The widget which triggered this drawing. If is null
, the window
as returned by WindowManager.findWindow(int)
will be used; otherwise, the
widget's window will be used.code
- Logic to safely execute inside the event bracket.private static SubMenuGuiImpl createSelectResetSubmenu(java.lang.String submenuTitle, java.awt.event.MouseAdapter selectAdapter, java.awt.event.MouseAdapter resetAdapter, boolean usePrompt)
submenuTitle
- Submenu title.selectAdapter
- Mouse adapter for "select" action.resetAdapter
- Mouse adapter for "reset" action.usePrompt
- Flag to indicate that after pressing one option a prompt will be displayed.private static BrowseColumnGuiImpl resolveColumn(BrowseGuiImpl browse, BrowseColumnGuiImpl column, boolean visible)
browse
- The browse for which the column-specific action is done.column
- The column for which the action was triggered. If null
, a prompt is displayed.visible
- Flag to indicate if a visible column should be resolved or an invisible one.null
.private static java.lang.String getColumnLabel(BrowseColumnGuiImpl column)
column
- The column for which the name should be retrieved.