private IWidget isInternalFrameUsed(IApplication application, int sheetType) { IWidget[] frames = application.getMainFrame().getDesktopContainer().getAllWidgets(); for (int i = 0; i < frames.length; i++) { if ((sheetType == ST_SHEET_TYPE_FIND_VALUES && frames[i] instanceof SmarttoolFindBadNullValuesFrame) || (sheetType == ST_SHEET_TYPE_CHANGE_VALUES && frames[i] instanceof SmarttoolChangeValuesFrame) || (sheetType == ST_SHEET_TYPE_MISSING_INICES && frames[i] instanceof SmarttoolMissingIndicesFrame) ) { return frames[i]; } } return null; }
private IWidget isInternalFrameUsed(IApplication application, int sheetType) { IWidget[] frames = application.getMainFrame().getDesktopContainer().getAllWidgets(); for (int i = 0; i < frames.length; i++) { if ((sheetType == FB_SHEET_TYPE_CREATE && frames[i] instanceof FirebirdManagerCreateDatabaseFrame) || (sheetType == FB_SHEET_TYPE_USER && frames[i] instanceof FirebirdManagerUserManagerFrame) || (sheetType == FB_SHEET_TYPE_BACKUP && frames[i] instanceof FirebirdManagerBackupRestoreFrame) || (sheetType == FB_SHEET_TYPE_GRANT && frames[i] instanceof FirebirdManagerGrantFrame) || (sheetType == FB_SHEET_TYPE_ROLE && frames[i] instanceof FirebirdManagerRoleFrame) ) { return frames[i]; } } return null; }
private void closeAllToolWindows() { IWidget[] frames = WidgetUtils.getOpenToolWindows(getDesktopContainer().getAllWidgets()); for (int i = 0; i < frames.length; ++i) { frames[i].dispose(); } }
private void closeAllToolWindows() { IWidget[] frames = WidgetUtils.getOpenToolWindows(getDesktopContainer().getAllWidgets()); for (int i = 0; i < frames.length; ++i) { frames[i].dispose(); } }
getDesktopContainer().putClientProperty("JDesktopPane.dragMode", null); getDesktopContainer().putClientProperty("JDesktopPane.dragMode", "outline");
getDesktopContainer().putClientProperty("JDesktopPane.dragMode", null); getDesktopContainer().putClientProperty("JDesktopPane.dragMode", "outline");
@Override public void sessionEnding(ISession session) { super.sessionEnding(session); IWidget[] frames = session.getApplication().getMainFrame().getDesktopContainer().getAllWidgets(); for (int i = 0; i < frames.length; i++) { if (frames[i] instanceof FirebirdManagerGrantFrame || frames[i] instanceof FirebirdManagerRoleFrame) { frames[i].dispose(); } } }
@Override public void sessionEnding(ISession session) { super.sessionEnding(session); IWidget[] frames = session.getApplication().getMainFrame().getDesktopContainer().getAllWidgets(); for (int i = 0; i < frames.length; i++) { if (frames[i] instanceof SmarttoolFindBadNullValuesFrame || frames[i] instanceof SmarttoolChangeValuesFrame || frames[i] instanceof SmarttoolMissingIndicesFrame ) { frames[i].dispose(); } } } }
private void selectFrontWindow() { if(false == _app.getDesktopStyle().isInternalFrameStyle()) { // This is a funny functionality anyway and // leads to problems with the DockTabStyle. // E.g. when SessionProperties is closed first tab gets selected. return; } final IDesktopContainer desktop = _app.getMainFrame().getDesktopContainer(); if (desktop != null) { final IWidget[] jifs = desktop.getAllWidgets(); if (jifs != null && jifs.length > 0) { jifs[0].moveToFront(); } } }
private void selectFrontWindow() { if(false == _app.getDesktopStyle().isInternalFrameStyle()) { // This is a funny functionality anyway and // leads to problems with the DockTabStyle. // E.g. when SessionProperties is closed first tab gets selected. return; } final IDesktopContainer desktop = _app.getMainFrame().getDesktopContainer(); if (desktop != null) { final IWidget[] jifs = desktop.getAllWidgets(); if (jifs != null && jifs.length > 0) { jifs[0].moveToFront(); } } }
public void run() { IDesktopContainer comp = getDesktopContainer(); comp.setPreferredSize(comp.getRequiredSize()); comp.revalidate(); if(_app.getDesktopStyle().isDockTabStyle()) { _app.getMultipleWindowsHandler().registerMainFrame((DockTabDesktopPane)_desktop); } } });
public void run() { IDesktopContainer comp = getDesktopContainer(); comp.setPreferredSize(comp.getRequiredSize()); comp.revalidate(); if(_app.getDesktopStyle().isDockTabStyle()) { _app.getMultipleWindowsHandler().registerMainFrame((DockTabDesktopPane)_desktop); } } });
getDesktopContainer().setDesktopManager(new SquirrelDesktopManager(_app)); final JScrollPane sp = new JScrollPane(getDesktopContainer().getComponent()); sp.setBorder(BorderFactory.createEmptyBorder()); _statusBar.setFont(fn); setJMenuBar(new MainFrameMenuBar(_app, getDesktopContainer(), _app.getActionCollection()));
getDesktopContainer().setDesktopManager(new SquirrelDesktopManager(_app)); final JScrollPane sp = new JScrollPane(getDesktopContainer().getComponent()); sp.setBorder(BorderFactory.createEmptyBorder()); _statusBar.setFont(fn); setJMenuBar(new MainFrameMenuBar(_app, getDesktopContainer(), _app.getActionCollection()));
public void widgetOpened(WidgetEvent evt) { final IWidget widget = evt.getWidget(); if (null != evt.getTabHandleEvent() && evt.getTabHandleEvent().isWasAddedToToMainApplicationWindow()) { addWidgetToWindowMenu(widget); } // Enable/Disable actions that require open session frames. IWidget[] frames = WidgetUtils.getOpenNonToolWindows(getMainFrame().getDesktopContainer().getAllWidgets()); _app.getActionCollection().internalFrameOpenedOrClosed(frames.length); refireSessionSheetOpened(evt); }
public void widgetOpened(WidgetEvent evt) { final IWidget widget = evt.getWidget(); if (null != evt.getTabHandleEvent() && evt.getTabHandleEvent().isWasAddedToToMainApplicationWindow()) { addWidgetToWindowMenu(widget); } // Enable/Disable actions that require open session frames. IWidget[] frames = WidgetUtils.getOpenNonToolWindows(getMainFrame().getDesktopContainer().getAllWidgets()); _app.getActionCollection().internalFrameOpenedOrClosed(frames.length); refireSessionSheetOpened(evt); }
IWidget sif = getMainFrame().getDesktopContainer().getSelectedWidget(); if (sif instanceof ISessionWidget)
IWidget sif = getMainFrame().getDesktopContainer().getSelectedWidget(); if (sif instanceof ISessionWidget)
IWidget[] frames = WidgetUtils.getOpenNonToolWindows(getMainFrame().getDesktopContainer().getAllWidgets());
IWidget[] frames = WidgetUtils.getOpenNonToolWindows(getMainFrame().getDesktopContainer().getAllWidgets());