Java 类org.eclipse.draw2d.CheckBox 实例源码

项目:PDFReporter-Studio    文件:ColumnFigure.java   
/**
 * Constructs a CheckBox with the passed text in its label.
 * 
 * @param text
 *          The label text
 * @since 2.0
 */
public ColumnFigure(String text, Image image) {
    setLayoutManager(new FlowLayout(true));
    checkbox = new CheckBox();
    checkbox.addChangeListener(new ChangeListener() {

        @Override
        public void handleStateChanged(ChangeEvent event) {
            if (event.getPropertyName().equals(ButtonModel.SELECTED_PROPERTY))
                handleSelectionChanged();
        }
    });
    add(checkbox);
    Label lbl = new Label(ConvertUtil.cleanDbNameFull(text), image);
    lbl.setTextPlacement(PositionConstants.WEST);
    add(lbl);
}
项目:neoscada    文件:RoundDetailsPart.java   
private Figure makeHeader ()
{
    this.button = new CheckBox ( "Active" );

    this.button.getModel ().addActionListener ( new ActionListener () {

        @Override
        public void actionPerformed ( final ActionEvent event )
        {
            setEnabled ( RoundDetailsPart.this.button.getModel ().isSelected () );
        }
    } );

    return this.button;
}
项目:neoscada    文件:BooleanAlarmDetails.java   
private Figure makeHeader ()
{
    this.button = new CheckBox ( Messages.BooleanAlarmDetails_active );

    this.button.getModel ().addActionListener ( new ActionListener () {

        @Override
        public void actionPerformed ( final ActionEvent event )
        {
            setEnabled ( BooleanAlarmDetails.this.button.getModel ().isSelected () );
        }
    } );

    return this.button;
}
项目:neoscada    文件:InputScaleDetails.java   
private Figure makeHeader ()
{
    this.button = new CheckBox ( "Active" );

    this.button.getModel ().addActionListener ( new ActionListener () {

        @Override
        public void actionPerformed ( final ActionEvent event )
        {
            setEnabled ( InputScaleDetails.this.button.getModel ().isSelected () );
        }
    } );

    return this.button;
}
项目:q7.quality.mockups    文件:Draw2DPart.java   
@Override
public Control construct(Composite parent) {
    Composite content = new Composite(parent, SWT.NONE);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(content);
    GridLayoutFactory.fillDefaults().applyTo(content);

    FigureCanvas canvas = new FigureCanvas(content);
    canvas.setContents(new CheckBox("Foo bar baz"));
    return content;
}
项目:q7.quality.mockups    文件:GraphicalViewerPart.java   
@Override
public Control construct(Composite parent) {
    Composite content = new Composite(parent, SWT.NONE);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(content);
    Canvas cv = new Canvas(content, SWT.BORDER);
    GridDataFactory.fillDefaults().grab(true, false).hint(SWT.DEFAULT, 20).applyTo(cv);
    GridLayoutFactory.fillDefaults().applyTo(content);
    GraphicalViewer gv = new GraphicalViewerImpl() {
        @Override
        protected void createDefaultRoot() {
            setRootFigure(new CheckBox("Foo bar baz"));
        }
    };
    gv.createControl(content);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(gv.getControl());

    GraphicalViewer gv2 = new ScrollingGraphicalViewer() {
        @Override
        protected void createDefaultRoot() {
            setRootFigure(new CheckBox("Foo2 bar2 baz2"));
        }
    };
    gv2.createControl(content);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(gv2.getControl());

    return content;
}
项目:wt-studio    文件:ParamModelFigure.java   
public IFigure createCheckbox()
{
    return new CheckBox();
}