public void createContents() { if (!contentCreated) { Control sashForm = createSashForm(); item.setControl(sashForm); initColors(); createExampleControls(exmplComp); createStyleControls(styleComp); exmplComp.layout(); styleComp.layout(); contentCreated = true; } }
private void updateFont() { Iterator iter = controls.iterator(); while (iter.hasNext()) { Control control = (Control) iter.next(); control.setFont(font); } // Force layout if (controls.size() > 0) { Composite parent = ((Control) controls.get(0)).getParent(); parent.layout(true, true); } }
protected void createNew() { controls.clear(); destroyExampleControls(); createExampleControls(exmplComp); updateVisible(); updateEnabled(); if (fgColorChooser != null) { updateFgColor(); } if (bgColorChooser != null) { updateBgColor(); } updateBgImage(); updateBgGradient(); if (fontChooser != null) { // Control control = ( Control )controls.get( 0 ); // font = control.getFont(); // if( font != null ) { // fontChooser.setFont( font ); // } updateFont(); } exmplComp.layout(); }