public abstract class IdeMainWindow extends MainWindow implements Addin
Modifier and Type | Class and Description |
---|---|
static interface |
IdeMainWindow.ControllerContext
Internal only.
|
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_CATEGORY_APPLICATION
Constant representing the action category for 'Application' menu items.
|
static java.lang.String |
ACTION_CATEGORY_EDIT
Constant representing the action category for 'Edit' menu items.
|
static java.lang.String |
ACTION_CATEGORY_FILE
Constant representing the action category for 'File' menu items.
|
static java.lang.String |
ACTION_CATEGORY_HELP
Constant representing the action category for 'Help' menu items.
|
static java.lang.String |
ACTION_CATEGORY_NAVIGATE
Constant representing the action category for 'Navigate' menu items.
|
static java.lang.String |
ACTION_CATEGORY_SEARCH
Constant representing the action category for 'Search' menu items.
|
static java.lang.String |
ACTION_CATEGORY_TOOLS
Constant representing the action category for 'Tools' menu items.
|
static java.lang.String |
ACTION_CATEGORY_VIEW
Constant representing the action category for 'View' menu items.
|
static java.lang.String |
ACTION_CATEGORY_WINDOWS
Constant representing the action category for 'Windows' menu items.
|
static java.lang.String |
MENU_EDIT
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the Edit menu. |
static java.lang.String |
MENU_FILE
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the File menu. |
static java.lang.String |
MENU_FILE_REOPEN
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the File | Reopen submenu. |
static java.lang.String |
MENU_HELP
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the Help menu. |
static java.lang.String |
MENU_NAVIGATE
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the Navigate menu. |
static java.lang.String |
MENU_RUN
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the Run menu. |
static java.lang.String |
MENU_SEARCH
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the Search menu. |
static java.lang.String |
MENU_TOOLS
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the Tools menu. |
static java.lang.String |
MENU_VIEW
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the View menu. |
static java.lang.String |
MENU_VIEW_OPTIONS
Deprecated.
|
static java.lang.String |
MENU_VIEW_TOOLBARS
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the View | Toolbars submenu. |
static java.lang.String |
MENU_WINDOW
Constant used with
MenuManager.getJMenu(java.lang.String)
to locate the Window menu. |
MAIN_WINDOW_NAME
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
IdeMainWindow() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addActiveViewListener(ActiveViewListener l)
Adds the specified listener
l to the list of active view
listeners. |
abstract void |
addDynamicMenuListener(DynamicMenuListener listener)
Adds the specified listener
listener to the list
of active view listeners. |
abstract void |
addIdeActivationListener(IdeActivationListener l)
Adds a listener to IDE activation.
|
void |
beforeShutDown()
Executed before shutdown.
|
void |
beforeShutDown(int status)
Executed before shutdown.
|
void |
close() |
protected View |
createIdeMainWindowView() |
protected Menubar |
createMenubar() |
protected StatusBar |
createStatusBar() |
protected Toolbar |
createToolbar() |
protected javax.swing.ActionMap |
getActionMap()
Returns an ActionMap for the IDE's accelerator keys.
|
java.util.List<? extends java.awt.Image> |
getBrandingIcons()
Subclasses should override this method to return a list of all
sizes of the branding icons.
|
abstract IdeMainWindow.ControllerContext |
getControllerContext()
Internal only.
|
View |
getIdeMainWindowView() |
protected javax.swing.InputMap |
getInputMap()
Installs the top-level multi-keystroke input map.
|
abstract View |
getLastActiveView()
Gets the last active view.
|
java.awt.Image |
getMainIcon()
Deprecated.
|
java.lang.String |
getMainTitle() |
protected Menubar |
getMenubar() |
protected StatusBar |
getStatusBar() |
abstract java.util.List<View> |
getVisibleViews() |
void |
initialize()
Invoked by the
AddinManager after the instance of the
Addin is instantiated. |
abstract boolean |
isFullScreenMode()
Method returns information about full screen mode.
|
void |
notifyWindowOpened() |
protected void |
postInitialize(IdeArgs ideArgs)
This method is called after the addins have been loaded.
|
void |
preInitialize() |
protected void |
processCommandLine(IdeArgs ideArgs) |
abstract void |
registerView(View view)
Register a view for participation in active view handling.
|
abstract void |
registerView(View view,
java.awt.Component component)
Register a view for participation in active view.
|
void |
reloadNodes(java.util.Set<NodeUtil.ReloadMode> reloadFlags)
Reloads all open nodes.
|
abstract void |
removeActiveViewListener(ActiveViewListener l)
Remove the specified listener
l from the list of
active view listeners. |
abstract void |
removeDynamicMenuListener(DynamicMenuListener listener)
Remove the specified listener
listener from the list of
active menu listeners. |
abstract void |
removeIdeActivationListener(IdeActivationListener l)
Removes a listener to IDE activation.
|
void |
requestViewsUpdate()
Request views update through registered ActiveviewListeners.
|
void |
setBrandingIcons(java.util.List<? extends java.awt.Image> images) |
void |
setMainIcon(java.awt.Image image)
Deprecated.
replaced with
|
void |
setMainTitle(java.lang.String title)
Deprecated.
since 11.0.0 with no replacement. The default implementation
of IdeMainWindow obtains the main title using
IdeUtil.getProgramName() .
The program name is determined as part of product branding. There is no
mechanism for extension writers to control the titlebar of the main
window; this is controlled by the product using TitleProvider
implementations. |
void |
setStatusBarVisible(boolean visible) |
static void |
showStartupTime() |
protected void |
terminateIde() |
abstract void |
unregisterView(View view)
Unregister a view from participation in active view handling.
|
protected void |
updateStatusBarAction()
Call this after the action has been created to ensure that the
action's toggled state is synched with the property.
|
void |
updateTitle()
Update the title of the main window.
|
void |
updateTitle(java.lang.Object ctx)
Deprecated.
since 11.0 Use
updateTitle() instead. |
static void |
updateVisibleActions() |
static void |
updateVisibleActions(int updateSource)
Internal only.
|
getMainWindow, getWindowListener, initGeometry, loadMainMenu, setMainWindow, terminate
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String MENU_FILE
MenuManager.getJMenu(java.lang.String)
to locate the File menu.public static final java.lang.String MENU_FILE_REOPEN
MenuManager.getJMenu(java.lang.String)
to locate the File | Reopen submenu.public static final java.lang.String MENU_EDIT
MenuManager.getJMenu(java.lang.String)
to locate the Edit menu.public static final java.lang.String MENU_VIEW
MenuManager.getJMenu(java.lang.String)
to locate the View menu.@Deprecated public static final java.lang.String MENU_VIEW_OPTIONS
public static final java.lang.String MENU_VIEW_TOOLBARS
MenuManager.getJMenu(java.lang.String)
to locate the View | Toolbars submenu.public static final java.lang.String MENU_SEARCH
MenuManager.getJMenu(java.lang.String)
to locate the Search menu.public static final java.lang.String MENU_NAVIGATE
MenuManager.getJMenu(java.lang.String)
to locate the Navigate menu.public static final java.lang.String MENU_RUN
MenuManager.getJMenu(java.lang.String)
to locate the Run menu.public static final java.lang.String MENU_TOOLS
MenuManager.getJMenu(java.lang.String)
to locate the Tools menu.public static final java.lang.String MENU_WINDOW
MenuManager.getJMenu(java.lang.String)
to locate the Window menu.public static final java.lang.String MENU_HELP
MenuManager.getJMenu(java.lang.String)
to locate the Help menu.public static final java.lang.String ACTION_CATEGORY_FILE
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public static final java.lang.String ACTION_CATEGORY_EDIT
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public static final java.lang.String ACTION_CATEGORY_VIEW
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public static final java.lang.String ACTION_CATEGORY_SEARCH
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public static final java.lang.String ACTION_CATEGORY_APPLICATION
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public static final java.lang.String ACTION_CATEGORY_NAVIGATE
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public static final java.lang.String ACTION_CATEGORY_TOOLS
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public static final java.lang.String ACTION_CATEGORY_WINDOWS
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public static final java.lang.String ACTION_CATEGORY_HELP
This constant should be used when creating the IdeAction
associated with a Command
to classify
the action by category. The value of this constant is a
translatable string that is presented to the user in the IDE
Preferences dialog for keyboard accelerator customization.
public abstract void registerView(View view)
unregisterView(View)
public abstract void registerView(View view, java.awt.Component component)
view
- component
- associated with the Viewpublic abstract void unregisterView(View view)
registerView(View)
public abstract View getLastActiveView()
public abstract java.util.List<View> getVisibleViews()
public abstract IdeMainWindow.ControllerContext getControllerContext()
public abstract void addActiveViewListener(ActiveViewListener l)
l
to the list of active view
listeners. These listeners are called every time a view becomes
active.public abstract void removeActiveViewListener(ActiveViewListener l)
l
from the list of
active view listeners.public abstract void addIdeActivationListener(IdeActivationListener l)
public abstract void removeIdeActivationListener(IdeActivationListener l)
public abstract void addDynamicMenuListener(DynamicMenuListener listener)
listener
to the list
of active view listeners. Listeners are notified before the dynamic
menu is displayed, and can add any relevent commands to the
dynamic menu.public void reloadNodes(java.util.Set<NodeUtil.ReloadMode> reloadFlags)
reloadFlags
- a set of flags of NodeUtil.ReloadMode
.
For example, EnumSet.of(NodeUtil.ReloadMode.RELOAD_PROMPTED_IF_DIRTY,
NodeUtil.ReloadMode.SILENT_RELOAD)
public abstract void removeDynamicMenuListener(DynamicMenuListener listener)
listener
from the list of
active menu listeners.public static final void updateVisibleActions()
protected View createIdeMainWindowView()
public final View getIdeMainWindowView()
public void close()
@Deprecated public void updateTitle(java.lang.Object ctx)
updateTitle()
instead.ctx
- the view to use to update the title.public void updateTitle()
public void setStatusBarVisible(boolean visible)
public void preInitialize()
preInitialize
in class MainWindow
public void initialize()
Addin
AddinManager
after the instance of the
Addin
is instantiated. When invoked, The Addin
should register and menu items, and actions required for use during this
classes lifecycle. Addin
authors should take care to ensure
that any extraneous initialization is not preformed on this method, and
any startup code that can be delayed until a later time is delayed, as
the Addin
's are synchronously initialized during the
startup of the IDE, and each Addin
has the potential to
negatively impact the startup time of the product.initialize
in interface Addin
initialize
in class MainWindow
AddinManager
protected void postInitialize(IdeArgs ideArgs)
public java.lang.String getMainTitle()
getMainTitle
in class MainWindow
@Deprecated public void setMainTitle(java.lang.String title)
IdeUtil.getProgramName()
.
The program name is determined as part of product branding. There is no
mechanism for extension writers to control the titlebar of the main
window; this is controlled by the product using TitleProvider
implementations.public java.awt.Image getMainIcon()
getMainIcon
in class MainWindow
public void setMainIcon(java.awt.Image image)
image
- public java.util.List<? extends java.awt.Image> getBrandingIcons()
MainWindow
getBrandingIcons
in class MainWindow
public void setBrandingIcons(java.util.List<? extends java.awt.Image> images)
protected final Menubar getMenubar()
protected Menubar createMenubar()
protected Toolbar createToolbar()
protected final StatusBar getStatusBar()
protected void updateStatusBarAction()
protected StatusBar createStatusBar()
protected javax.swing.ActionMap getActionMap()
protected javax.swing.InputMap getInputMap()
protected final void terminateIde()
public static final void updateVisibleActions(int updateSource)
public void requestViewsUpdate()
protected void processCommandLine(IdeArgs ideArgs) throws java.lang.Exception
java.lang.Exception
public void beforeShutDown()
public void beforeShutDown(int status)
status
- The exit code to shut down the IDE with.public static void showStartupTime()
public void notifyWindowOpened()
public abstract boolean isFullScreenMode()