Examples of ExpandItem


Examples of org.eclipse.swt.widgets.ExpandItem

*/
public class ExpandItemHeightAction implements ISetPostAction {

  public void action(Object target, IProperty property, Object value) {
    if (target instanceof ExpandItem && value instanceof Control) {
      ExpandItem targetControl = (ExpandItem) target;
      Control valueControl = (Control) value;
      targetControl.setHeight(valueControl.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    }
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.ExpandItem

  private ExpandItem getItem(final String nodeText) {
    return (ExpandItem) syncExec(new WidgetResult() {
      public Widget run() {
        ExpandItem[] items = getControl().getItems();
        for (int i = 0; i < items.length; i++) {
          ExpandItem item = items[i];
          if (item.getText().equals(nodeText))
            return item;
        }
        return null;
      }
    });
View Full Code Here

Examples of org.eclipse.swt.widgets.ExpandItem

    composite.setLayout(new GridLayout());
    new Button(composite, SWT.PUSH).setText("SWT.PUSH");
    new Button(composite, SWT.RADIO).setText("SWT.RADIO");
    new Button(composite, SWT.CHECK).setText("SWT.CHECK");
    new Button(composite, SWT.TOGGLE).setText("SWT.TOGGLE");
    ExpandItem item = new ExpandItem(expandBar1, SWT.NONE, 0);
    item.setText(ControlExample.getResourceString("Item1_Text"));
    item.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    item.setControl(composite);
    item.setImage(instance.images[ControlExample.ciClosedFolder]);

    // Second item
    composite = new Composite(expandBar1, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    new Label(composite, SWT.NONE).setImage(display.getSystemImage(SWT.ICON_ERROR));
    new Label(composite, SWT.NONE).setText("SWT.ICON_ERROR");
    new Label(composite, SWT.NONE).setImage(display.getSystemImage(SWT.ICON_INFORMATION));
    new Label(composite, SWT.NONE).setText("SWT.ICON_INFORMATION");
    new Label(composite, SWT.NONE).setImage(display.getSystemImage(SWT.ICON_WARNING));
    new Label(composite, SWT.NONE).setText("SWT.ICON_WARNING");
    new Label(composite, SWT.NONE).setImage(display.getSystemImage(SWT.ICON_QUESTION));
    new Label(composite, SWT.NONE).setText("SWT.ICON_QUESTION");
    item = new ExpandItem(expandBar1, SWT.NONE, 1);
    item.setText(ControlExample.getResourceString("Item2_Text"));
    item.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    item.setControl(composite);
    item.setImage(instance.images[ControlExample.ciOpenFolder]);
    item.setExpanded(true);
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.ExpandItem

   *          parent object
   */
  public XExpandItem( Object parent )
  {
    super( (ExpandBar)parent, SWT.NONE );
    item = new ExpandItem( (ExpandBar)parent, SWT.NONE );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.