Package org.gwtoolbox.widget.client.button

Examples of org.gwtoolbox.widget.client.button.SimpleToggleButton$Group


        DockPanel main = new DockPanel();

        FlowPanel buttons = new FlowPanel();
        buttons.setWidth("100%");
        final SimpleToggleButton toggleLeftBtn = new SimpleToggleButton("Hide Left");
        toggleLeftBtn.getDownFace().setText("Show Left");
        DOM.setStyleAttribute(toggleLeftBtn.getElement(), "marginRight", "20px");
        buttons.add(toggleLeftBtn);
        final SimpleToggleButton toggleRightBtn = new SimpleToggleButton("Hide Right");
        toggleRightBtn.getDownFace().setText("Show Right");
        buttons.add(toggleRightBtn);

        final SimpleHorizontalSplitPanel hsp = new SimpleHorizontalSplitPanel();
        hsp.setSize("100%", "100%");

        ScrollPanel lsp = new ScrollPanel(createContent(createVeryLongText(), "#CCFFCC"));
        lsp.setSize("100%", "100%");
        hsp.setLeftWidget(lsp);

        ScrollPanel rsp = new ScrollPanel(createContent(createVeryLongText(), "#FFFBA3"));
        rsp.setSize("100%", "100%");
        hsp.setRightWidget(rsp);

        hsp.setSize("100%", "100%");

        toggleLeftBtn.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                hsp.setLeftWidgetVisible(!toggleLeftBtn.isDown());
                toggleRightBtn.setDown(!toggleLeftBtn.isDown());
            }
        });

        toggleRightBtn.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                hsp.setRightWidgetVisible(!toggleRightBtn.isDown());
                toggleLeftBtn.setDown(!toggleRightBtn.isDown());
            }
        });

        main.add(buttons, DockPanel.NORTH);
        main.add(hsp, DockPanel.CENTER);
View Full Code Here


        vsp.setTopWidget(hsp);
        vsp.setBottomWidget(vp);
        vsp.setSplitPosition("75%");

        HorizontalPanel buttons = new HorizontalPanel();
        final SimpleToggleButton hideLeftButton = new SimpleToggleButton("Hide Left");
        hideLeftButton.getDownFace().setText("Show Left");
        hideLeftButton.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                hsp.setLeftWidgetVisible(!hideLeftButton.isDown());
            }
        });
        buttons.add(hideLeftButton);
        addGap(buttons, "10px");

        final SimpleToggleButton hideRightButton = new SimpleToggleButton("Hide Right");
        hideRightButton.getDownFace().setText("Show Right");
        hideRightButton.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
               hsp.setRightWidgetVisible(!hideRightButton.isDown());
            }
        });
        buttons.add(hideRightButton);
        addGap(buttons, "10px");

        final SimpleToggleButton hideBottomButton = new SimpleToggleButton("Hide Bottom");
        hideBottomButton.getDownFace().setText("Show Bottom");
        hideBottomButton.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                vsp.setBottomWidgetVisible(!hideBottomButton.isDown());
            }
        });
        buttons.add(hideBottomButton);

        buttons.setWidth("100%");
View Full Code Here

            }
        });
        clearButton.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);
        buttons.add(clearButton);

        SimpleToggleButton enableDisableButton = new SimpleToggleButton("Disable Animation");
        enableDisableButton.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                deck.setAnimationEnabled(!deck.isAnimationEnabled());
            }
        });
        enableDisableButton.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);
        buttons.add(enableDisableButton);

        initWidget(main);

    }
View Full Code Here

        DockPanel main = new DockPanel();

        FlowPanel buttons = new FlowPanel();
        buttons.setWidth("100%");
        final SimpleToggleButton toggleTopBtn = new SimpleToggleButton("Hide Top");
        toggleTopBtn.getDownFace().setText("Show Top");
        DOM.setStyleAttribute(toggleTopBtn.getElement(), "marginRight", "20px");
        buttons.add(toggleTopBtn);
        final SimpleToggleButton toggleBottomBtn = new SimpleToggleButton("Hide Bottom");
        toggleBottomBtn.getDownFace().setText("Show Bottom");
        buttons.add(toggleBottomBtn);

        final SimpleVerticalSplitPanel vsp = new SimpleVerticalSplitPanel();
        vsp.setSize("100%", "100%");
        ScrollPanel tsp = new ScrollPanel(createContent(createVeryLongText(), "#CCFFCC"));
        tsp.setSize("100%", "100%");
        vsp.setTopWidget(tsp);
        ScrollPanel bsp = new ScrollPanel(createContent(createVeryLongText(), "#FFFBA3"));
        bsp.setSize("100%", "100%");
        vsp.setBottomWidget(bsp);

        toggleTopBtn.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                vsp.setTopWidgetVisible(!toggleTopBtn.isDown());
                toggleBottomBtn.setDown(!toggleTopBtn.isDown());
            }
        });

        toggleBottomBtn.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                vsp.setBottomWidgetVisible(!toggleBottomBtn.isDown());
                toggleTopBtn.setDown(!toggleBottomBtn.isDown());
            }
        });

        main.add(buttons, DockPanel.NORTH);
        main.add(vsp, DockPanel.CENTER);
View Full Code Here

        DockPanel main = new DockPanel();

        FlowPanel buttons = new FlowPanel();
        buttons.setWidth("100%");
        final SimpleToggleButton toggleLeftBtn = new SimpleToggleButton("Hide Left");
        toggleLeftBtn.getDownFace().setText("Show Left");
        DOM.setStyleAttribute(toggleLeftBtn.getElement(), "marginRight", "20px");
        buttons.add(toggleLeftBtn);
        final SimpleToggleButton toggleRightBtn = new SimpleToggleButton("Hide Right");
        toggleRightBtn.getDownFace().setText("Show Right");
        DOM.setStyleAttribute(toggleRightBtn.getElement(), "marginRight", "20px");
        buttons.add(toggleRightBtn);
        final SimpleToggleButton toggleBottomBtn = new SimpleToggleButton("Hide Bottom");
        toggleBottomBtn.getDownFace().setText("Show Bottom");
        buttons.add(toggleBottomBtn);
        DOM.setStyleAttribute(toggleBottomBtn.getElement(), "marginRight", "20px");       
        final SimpleToggleButton toggleTopBtn = new SimpleToggleButton("Hide Top");
        toggleTopBtn.getDownFace().setText("Show Top");
        buttons.add(toggleTopBtn);


        final DoubleHorizontalSplitPanel hsp = new DoubleHorizontalSplitPanel();
        hsp.setSize("100%", "100%");
        hsp.setLeftWidget(createContent("Left", "#CCFFCC"));
        hsp.setCenterWidget(createContent("Center", "#FFC0CB"));
        hsp.setRightWidget(createContent("Right", "#FFFBA3"));

        final SimpleVerticalSplitPanel vsp = new SimpleVerticalSplitPanel();
        vsp.setSize("100%", "100%");
        vsp.setTopWidget(hsp);
        vsp.setBottomWidget(createContent("Bottom", "#E6E6FA"));
        vsp.setSplitPosition("70%");
        vsp.setTopWidgetVisible(false);

        toggleLeftBtn.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                hsp.setLeftWidgetVisible(!toggleLeftBtn.isDown());
            }
        });

        toggleRightBtn.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                hsp.setRightWidgetVisible(!toggleRightBtn.isDown());
            }
        });

        toggleBottomBtn.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                vsp.setBottomWidgetVisible(!toggleBottomBtn.isDown());
            }
        });
        toggleTopBtn.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                vsp.setTopWidgetVisible(!toggleTopBtn.isDown());
            }
        });
        toggleTopBtn.setDown(true);

        main.add(buttons, DockPanel.NORTH);
        main.add(vsp, DockPanel.CENTER);
        main.setCellHeight(buttons, "30px");
        main.setCellWidth(buttons, "100%");
View Full Code Here

    }

    Variable v = ds.findVariable("time_offset");
    v.addAttribute(new Attribute( "units", "seconds since "+dfo.toDateTimeString(start)));

    Group root = ds.getRootGroup();
    root.addAttribute(new Attribute( "Convention", "Suomi-Station-CDM"));   
    ds.finish();
  }
View Full Code Here

  public void testEosMetadata() {
    //NetcdfFile ncfile = TestH5.open("c:/data/hdf5/HIRDLS/HIRDLS2_v0.3.1-aIrix-c3_2003d106.h5");
    NetcdfFile ncfile = TestH5.open(testDir +"HIRDLS2-Aura73p_b029_2000d275.he5");

    Group root = ncfile.getRootGroup();
    Group g = root.findGroup("HDFEOS INFORMATION");
    Variable dset = g.findVariable("StructMetadata.0");
    assert(null != dset );
    assert(dset.getDataType() == DataType.CHAR);

    // read entire array
    Array A;
    try {
      A = dset.read();
    }
    catch (IOException e) {
      System.err.println("ERROR reading file");
      assert(false);
      return;
    }
    assert(A.getRank() == 1);
    assert (A instanceof ArrayChar);

    ArrayChar ca = (ArrayChar) A;
    String sval = ca.getString();
    System.out.println(dset.getFullName());
    System.out.println(" Length = "+sval.length());
    System.out.println(" Value = "+sval);

    ////////////////
    dset = g.findVariable("coremetadata.0");
    assert(null != dset );
    assert(dset.getDataType() == DataType.CHAR);

    // read entire array
    try {
View Full Code Here

    public int doAct(String filename) throws IOException {
      NetcdfFile ncfile = null;

      try {
        ncfile = NetcdfFile.open(filename);
        Group root = ncfile.getRootGroup();
        Group g = root.findGroup("HDFEOS INFORMATION");
        if (g == null) g = ncfile.getRootGroup();

        Variable dset = g.findVariable("StructMetadata.0");
        if (dset != null) {
          System.out.println("EOS file=" + filename);
          return 1;
        }
View Full Code Here

    public void setSearchPath(final String... groupNames) {
        final Group[] groups = new Group[groupNames.length];
        int count = 0;
        for (final String name : groupNames) {
            if (name != null) {
                final Group group = file.findGroup(name);
                if (group == null) {
                    continue; // Group not found - do not increment the counter.
                }
                groups[count] = group;
            }
View Full Code Here

     */
    @Override
    public String[] getSearchPath() {
        final String[] path = new String[groups.length];
        for (int i=0; i<path.length; i++) {
            final Group group = groups[i];
            if (group != null) {
                path[i] = group.getShortName();
            }
        }
        return path;
    }
View Full Code Here

TOP

Related Classes of org.gwtoolbox.widget.client.button.SimpleToggleButton$Group

Copyright © 2018 www.massapicom. 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.