150151152153154155156157158159160
} if (displayCount == 0) return; panel.validate(); panel.repaint(); ViewScreen screen = new ViewScreen(panel); screen.setTitle(title); screen.pack();
115116117118119120121122123124125
panel.setSize(MAX_SIZE, MAX_SIZE); panel.setLayout(new FlowLayout()); panel.add(legendPanel); } panel.addNotify(); panel.validate(); } protected ImageIcon createImageIcon(String path) { java.net.URL imgURL = getClass().getResource(path); if (imgURL != null) {
449450451452453454455456457458459
public boolean removeChild(Component child) { JPanel jpanel = (JPanel) getWidget(); LayoutManager layout = jpanel.getLayout(); if (layout == null) { jpanel.remove(child); jpanel.validate(); return true; } else { LayoutAdapter layoutAdapter = getLayoutAdapter(); boolean success = layoutAdapter.removeChild(child); if (success) {
455456457458459460461462463464465
return true; } else { LayoutAdapter layoutAdapter = getLayoutAdapter(); boolean success = layoutAdapter.removeChild(child); if (success) { jpanel.validate(); layoutAdapter.setContainer(jpanel); return true; } else return false; }
5859606162636465666768
} JPanel jpanel = (JPanel) adapter.getWidget(); jpanel.setLayout(null); adapter.setLayoutAdapter(null); adapter.doLayout(); jpanel.validate(); return Status.OK_STATUS; } @Override public IStatus redo(IProgressMonitor monitor, IAdaptable info)
8283848586878889909192
for (Pair pair : constraints) { adapter.addChildByConstraints(pair.child, pair.constraints); } adapter.doLayout(); adapter.setLayoutAdapter(null); jpanel.validate(); adapter.setDirty(true); adapter.addNotify(); return Status.OK_STATUS; }
6364656667686970717273
JPanel jpanel = (JPanel) jpaneladapter.getWidget(); LayoutAdapter adapter = LayoutAdapter.createLayoutAdapter(config); adapter.initConainerLayout(jpanel, monitor); jpaneladapter.setLayoutAdapter(null); jpaneladapter.doLayout(); jpanel.validate(); jpaneladapter.setDirty(true); jpaneladapter.addNotify(); return Status.OK_STATUS; }
8990919293949596979899
for (Pair pair : constraints) { jpaneladapter.addChildByConstraints(pair.child, pair.constraints); } jpaneladapter.doLayout(); jpaneladapter.setLayoutAdapter(null); jpanel.validate(); jpaneladapter.setDirty(true); jpaneladapter.addNotify(); return Status.OK_STATUS; }
144145146147148149150151152153154
} } }); getGalerie().add (panImage); panImage.validate (); getGalerie().revalidate (); int x = 0, y = getGalerie().getHeight ()-300, w = getGalerie().getWidth (), h = 300; Rectangle r = new Rectangle(x,y,w,h); getGalerie().scrollRectToVisible (r); }
128129130131132133134135136137138
catch (Exception e) { e.printStackTrace(); } // catch (Exception) contents.validate(); JScrollPane scroll = new JScrollPane(); this.setContentPane(scroll); this.validate(); scroll.validate(); scroll.setVisible(true);