ImageIcon frameIcon = ((ImageIcon) getIconFactory().getIcon(getIcon(), getIconFactory().getSmallIconSize())); if (frameIcon != null) { controllerFrame.setIconImage(frameIcon.getImage());
private JFrame createControllerFrame() { JFrame frame = new JFrame(); frame.setContentPane(new JDesktopPane()); frame.setIconImage(((ImageIcon) getIconFactory().getIcon(getIconImageURL(), IIconFactory.SMALL_ICON_SIZE)).getImage()); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); frame.setJMenuBar(createApplicationMenuBar()); frame.setGlassPane(createHermeticGlassPane()); frame.addWindowListener(new WindowAdapter() { /** * {@inheritDoc} */ @Override public void windowClosing(@SuppressWarnings("unused") WindowEvent e) { stop(); } }); return frame; }
private JMenu createWorkspacesMenu() { JMenu workspacesMenu = new JMenu(getTranslationProvider().getTranslation( "workspaces", getLocale())); workspacesMenu.setIcon(getIconFactory().getIcon( getWorkspacesMenuIconImageUrl(), IIconFactory.SMALL_ICON_SIZE)); for (String workspaceName : getWorkspaceNames()) { IViewDescriptor workspaceViewDescriptor = getWorkspace(workspaceName) .getViewDescriptor(); JMenuItem workspaceMenuItem = new JMenuItem(new WorkspaceSelectionAction( workspaceName, workspaceViewDescriptor)); workspacesMenu.add(workspaceMenuItem); } workspacesMenu.addSeparator(); workspacesMenu.add(new JMenuItem(new QuitAction())); return workspacesMenu; }
exitButton.setIcon(getIconFactory().getCancelIcon(getIconFactory().getSmallIconSize())); buttonBox.add(exitButton);
/** * {@inheritDoc} */ @Override protected CallbackHandler createLoginCallbackHandler() { DialogCallbackHandler callbackHandler = new DialogCallbackHandler(); callbackHandler.setLocale(getLocale()); callbackHandler.setTranslationProvider(getTranslationProvider()); callbackHandler.setIconFactory(getIconFactory()); return callbackHandler; }
private JMenu createActionMenu(ActionList actionList) { JMenu menu = new JMenu(actionList.getI18nName(getTranslationProvider(), getLocale())); if (actionList.getDescription() != null) { menu.setToolTipText(actionList.getI18nDescription( getTranslationProvider(), getLocale()) + IActionFactory.TOOLTIP_ELLIPSIS); } menu.setIcon(getIconFactory().getIcon(actionList.getIconImageURL(), IIconFactory.SMALL_ICON_SIZE)); for (IDisplayableAction action : actionList.getActions()) { menu.add(new JMenuItem(getViewFactory().getActionFactory().createAction( action, this, menu, null, null, getLocale()))); } return menu; }
.escapeForHTML(userFriendlyExceptionMessage))), getTranslation("error", getLocale()), JOptionPane.ERROR_MESSAGE, getIconFactory().getErrorIcon(getIconFactory().getLargeIconSize())); } else { traceUnexpectedException(ex); JErrorDialog dialog = JErrorDialog.createInstance(sourceComponent, this, getLocale()); dialog.setMessageIcon(getIconFactory().getErrorIcon( getIconFactory().getMediumIconSize())); dialog.setTitle(getTranslation("error", getLocale())); dialog.setMessage(HtmlHelper.toHtml(HtmlHelper.emphasis(HtmlHelper
JOptionPane.showMessageDialog(sourceComponent, HtmlHelper.emphasis(ex .getMessage()), getTranslationProvider().getTranslation("error", getLocale()), JOptionPane.ERROR_MESSAGE, getIconFactory() .getErrorIcon(IIconFactory.LARGE_ICON_SIZE)); } else if (ex instanceof BusinessException) { getTranslationProvider(), getLocale())), getTranslationProvider() .getTranslation("error", getLocale()), JOptionPane.ERROR_MESSAGE, getIconFactory().getErrorIcon(IIconFactory.LARGE_ICON_SIZE)); } else if (ex instanceof ConcurrencyFailureException) { JOptionPane.showMessageDialog(sourceComponent, HtmlHelper "concurrency.error.description", getLocale())), getTranslationProvider().getTranslation("error", getLocale()), JOptionPane.ERROR_MESSAGE, getIconFactory().getErrorIcon( IIconFactory.LARGE_ICON_SIZE)); } else { JErrorDialog dialog = JErrorDialog.createInstance(sourceComponent, getTranslationProvider(), getLocale()); dialog.setMessageIcon(getIconFactory().getErrorIcon( IIconFactory.MEDIUM_ICON_SIZE)); dialog.setTitle(getTranslationProvider().getTranslation("error",
/** * Creates a new JInternalFrame and populates it with a view. * * @param view * the view to be set into the internal frame. * @return the constructed internal frame. */ private JInternalFrame createJInternalFrame(IView<JComponent> view) { JInternalFrame internalFrame = new JInternalFrame(view.getDescriptor() .getI18nName(getTranslationProvider(), getLocale())); internalFrame.setFrameIcon(getIconFactory().getIcon( view.getDescriptor().getIconImageURL(), IIconFactory.SMALL_ICON_SIZE)); internalFrame.setResizable(true); internalFrame.setClosable(false); internalFrame.setMaximizable(true); internalFrame.setIconifiable(true); internalFrame.getContentPane().add(view.getPeer(), BorderLayout.CENTER); internalFrame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); internalFrame.setGlassPane(createHermeticGlassPane()); return internalFrame; }
workspaceView, workspaceNavigatorViewDescriptor.getI18nName(this, getLocale()), getIconFactory().getIcon( workspaceNavigatorViewDescriptor.getIcon(), getIconFactory().getSmallIconSize())); workspaceInternalFrame .addInternalFrameListener(new WorkspaceInternalFrameListener(