popupScrollBar.addAdjustmentListener(new AdjustmentListener() { @Override public void adjustmentValueChanged(AdjustmentEvent e) { doLayout(); repaint();
public void setContent(Component component) { Container contentPane = getContentPane(); if (currentContent != null) { contentPane.remove(currentContent); } contentPane.add(component, BorderLayout.CENTER); currentContent = component; contentPane.doLayout(); repaint(); }
public void addNotify(){ super.addNotify(); // call the real one first... this.invalidate(); this.validate(); this.doLayout(); } //--------------------------------------------------------------------
@Override public void doLayout() { super.doLayout(); wrapper.doLayout(); getContentPane().doLayout(); }
public boolean imageUpdate(Image img, int flaginfo, int x, int y, int width, int height) { initSize(); Container parent = getParent(); if(parent != null) parent.doLayout(); return super.imageUpdate(img, flaginfo, x, y, width, height); }
private void fireListOrderChanged() { synchronized (parts) { partStackPanel.removeAll(); final int size = parts.size(); for (int i = 0; i < size; i++) { ConfigPartWrapper wrapper = parts.get(i); wrapper.setListPosition(i, i == 0, i >= parts.size() - 1); partStackPanel.add(wrapper.getRootPane()); } } partStackPanel.getParent().revalidate(); partStackPanel.getParent().doLayout(); partStackPanel.getParent().repaint(); }
public void actionPerformed(ActionEvent e) { boolean allCompleted = true; for (Iterator iter = tasks.iterator(); iter.hasNext();) { PercentTask element = (PercentTask)iter.next(); if (!element.isCompleted()) { allCompleted = false; element.execute(); } } container.invalidate(); container.doLayout(); container.repaint(); if (allCompleted) { complete(); } }
private void redoLayout() { getParent().doLayout(); getParent().validate(); }
/** * */ protected void refreshAppTable() { // System.out.println("ref table"); ((DefaultTableModel)apptable.getModel()).fireTableDataChanged(); apptable.getParent().invalidate(); apptable.getParent().doLayout(); apptable.repaint(); }
/** * */ protected void refreshAppTable() { // System.out.println("ref table"); ((DefaultTableModel)apptable.getModel()).fireTableDataChanged(); apptable.getParent().invalidate(); apptable.getParent().doLayout(); apptable.repaint(); }
@Override protected void showPanel(final Container p) { getParent().add(p, "south,height 300!", // getParent().getComponentCount() - 1); getParent().doLayout(); getParent().revalidate(); SwingUtilities.getWindowAncestor(this).pack(); getParent().repaint(); EventQueue.invokeLater(() -> { p.setVisible(true); try { Thread.sleep(100); } catch (final InterruptedException exc) {} requestFocusInWindow(); }); }
public void fitToWindow() { ImageWindow win = imp.getWindow(); if (win==null) return; Rectangle bounds = win.getBounds(); Insets insets = win.getInsets(); int sliderHeight = win.getSliderHeight(); double xmag = (double)(bounds.width-(insets.left+insets.right+ImageWindow.HGAP*2))/srcRect.width; double ymag = (double)(bounds.height-(ImageWindow.VGAP*2+insets.top+insets.bottom+sliderHeight))/srcRect.height; setMagnification(Math.min(xmag, ymag)); int width=(int)(imageWidth*magnification); int height=(int)(imageHeight*magnification); if (width==dstWidth&&height==dstHeight) return; srcRect=new Rectangle(0,0,imageWidth, imageHeight); setSize(width, height); getParent().doLayout(); }
public void fitToWindow() { ImageWindow win = imp.getWindow(); if (win==null) return; Rectangle bounds = win.getBounds(); Insets insets = win.getInsets(); int sliderHeight = win.getSliderHeight(); double xmag = (double)(bounds.width-(insets.left+insets.right+ImageWindow.HGAP*2))/srcRect.width; double ymag = (double)(bounds.height-(ImageWindow.VGAP*2+insets.top+insets.bottom+sliderHeight))/srcRect.height; setMagnification(Math.min(xmag, ymag)); int width=(int)(imageWidth*magnification); int height=(int)(imageHeight*magnification); if (width==dstWidth&&height==dstHeight) return; srcRect=new Rectangle(0,0,imageWidth, imageHeight); setSize(width, height); getParent().doLayout(); }
@Override public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) { if (infoflags == ImageObserver.ALLBITS) { flush(); resize(); getParent().doLayout(); repaint(); } return super.imageUpdate(img, infoflags, x, y, w, h); }
public void run() { dorefresh = false; fireTableDataChanged(); table.getParent().invalidate(); table.getParent().doLayout(); table.repaint(); } });
/** Resizes the plot (unless frozen) to fit the window */ public void fitToWindow() { if (plot == null || plot.isFrozen()) { super.fitToWindow(); return; } ImageWindow win = imp.getWindow(); if (win==null) return; Rectangle bounds = win.getBounds(); Dimension extraSize = win.getExtraSize(); int width = bounds.width-extraSize.width;//(insets.left+insets.right+ImageWindow.HGAP*2); int height = bounds.height-extraSize.height;//(insets.top+insets.bottom+ImageWindow.VGAP*2); //IJ.log("fitToWindow "+bounds+"-> w*h="+width+"*"+height); resizeCanvas(width, height); getParent().doLayout(); }
public void run() { dorefresh = false; fireTableDataChanged(); getTable().getParent().invalidate(); getTable().getParent().doLayout(); getTable().repaint(); } });
private void modifieEbliPageFormat() { if (app_ == null) { new EbliMiseEnPageDialog(target_, null, null).activate(); } else { new EbliMiseEnPageDialog(target_, app_, app_.getInformationsSoftware()).activate(); } getContentPane().doLayout(); getContentPane().repaint(); }
public void run() { dorefresh = false; fireTableDataChanged(); getTable().getParent().invalidate(); getTable().getParent().doLayout(); getTable().repaint(); } });
/** Resizes the plot (unless frozen) to fit the window */ public void fitToWindow() { if (plot == null || plot.isFrozen()) { super.fitToWindow(); return; } ImageWindow win = imp.getWindow(); if (win==null) return; Rectangle bounds = win.getBounds(); Dimension extraSize = win.getExtraSize(); int width = bounds.width-extraSize.width;//(insets.left+insets.right+ImageWindow.HGAP*2); int height = bounds.height-extraSize.height;//(insets.top+insets.bottom+ImageWindow.VGAP*2); //IJ.log("fitToWindow "+bounds+"-> w*h="+width+"*"+height); resizeCanvas(width, height); getParent().doLayout(); }