void addInternalFrame(JInternalFrame _f) { if (desktop_ != null) { desktop_.addInternalFrame(_f); if (getAssistant() != null) getAssistant().addEmitters(_f); } }
public void run() { BuPreviewFrame pf=new BuPreviewFrame (null,images,_parent,_name,_composant); pf.setVisible(true); if(_desktop!=null) { _desktop.addInternalFrame(pf); _desktop.activateInternalFrame(pf); } else { new BuDialogMessage(null,null,pf).activate(); } } };
public void run() { window_.getContent().setVisible(true); desktop_.addInternalFrame(window_); window_.setLocation(loc_); doAfterDisplay(); if (first) { desktop_.arrangePalettes(); } else { // pour que les palettes s'affichent correctement. window_.pack(); } } });
private void showWindow() { if (loc_ == null) { loc_ = window_.getLocation(); if ((loc_.x == 0) && (loc_.y == 0)) { nbr_ = (nbr_ + 1) % 8; loc_ = new Point(5 + 20 * nbr_, 5 + 20 * nbr_); window_.setLocation(loc_); } } window_.pack(); Icon i = getIcon(); if (i != null) window_.setFrameIcon(i); // SwingUtilities.updateComponentTreeUI(window_); window_.setVisible(true); if (desktop_ != null) desktop_.addInternalFrame(window_); else { if(d==null){ d = new JDialog(); d.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); d.setContentPane(window_.getContentPane()); d.pack(); } d.show(); } window_.setLocation(loc_); window_.revalidate(); }
private void showEditionDialog() { if (desktop_ != null) { if (editionDialog_ == null) { tableModel_ = createValueModel(); editionDialog_ = new BuPalette(); editionDialog_.setClosable(true); editionDialog_.setResizable(true); final BuTable tb = new BuTable(tableModel_); final BuScrollPane sp = new BuScrollPane(tb); sp.setPreferredWidth(120); sp.setPreferredHeight(60); editionDialog_.setContent(sp); editionDialog_.setVisible(true); editionDialog_.pack(); tb.getColumnModel().getColumn(0).setWidth(10); desktop_.addInternalFrame(editionDialog_); // on place la fenetre en dessus de ce panneau final Point desktopPt = desktop_.getLocationOnScreen(); final Point p = this.getLocationOnScreen(); editionDialog_.setLocation(p.x - desktopPt.x, p.y + getHeight() + 5 - desktopPt.y); } else { desktop_.addInternalFrame(editionDialog_); } } }