Package org.gwtoolbox.widget.client.button

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


            "The default is 0.").withShortName("err").create();

    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();

    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(idFieldOpt).withOption(
        outputOpt).withOption(delimiterOpt).withOption(helpOpt).withOption(fieldOpt).withOption(maxOpt)
        .withOption(dictOutOpt).withOption(powerOpt).withOption(maxDFPercentOpt)
        .withOption(weightOpt).withOption(minDFOpt).withOption(maxPercentErrorDocsOpt).create();

    try {
View Full Code Here


   
    Option confusionMatrixOpt = obuilder.withLongName("confusionMatrix").withRequired(false).withArgument(
        abuilder.withName("confusionMatrix").withMinimum(1).withMaximum(1).create()).withDescription(
        "Export ConfusionMatrix as SequenceFile").withShortName("cm").create();
     
    Group group = gbuilder.withName("Options").withOption(defaultCatOpt).withOption(dirOpt).withOption(
      encodingOpt).withOption(gramSizeOpt).withOption(pathOpt).withOption(typeOpt).withOption(dataSourceOpt)
        .withOption(helpOpt).withOption(methodOpt).withOption(verboseOutputOpt).withOption(alphaOpt)
        .withOption(confusionMatrixOpt).create();
   
    try {
View Full Code Here

      "Location of model: hdfs. Default Value: hdfs").withShortName("source").create();
   
    Option skipCleanupOpt = obuilder.withLongName("skipCleanup").withRequired(false).withDescription(
        "Skip cleanup of feature extraction output").withShortName("sc").create();
   
    Group group = gbuilder.withName("Options").withOption(gramSizeOpt).withOption(helpOpt).withOption(
      inputDirOpt).withOption(outputOpt).withOption(typeOpt).withOption(dataSourceOpt).withOption(alphaOpt)
        .withOption(minDfOpt).withOption(minSupportOpt).withOption(skipCleanupOpt).create();
    try {
      Parser parser = new Parser();
     
View Full Code Here

   
    Option dataSourceOpt = obuilder.withLongName("dataSource").withRequired(true).withArgument(
      abuilder.withName("dataSource").withMinimum(1).withMaximum(1).create()).withDescription(
      "Location of model: hdfs").withShortName("source").create();
   
    Group options = gbuilder.withName("Options").withOption(pathOpt).withOption(classifyOpt).withOption(
      encodingOpt).withOption(analyzerOpt).withOption(defaultCatOpt).withOption(gramSizeOpt).withOption(
      typeOpt).withOption(dataSourceOpt).create();
   
    Parser parser = new Parser();
    parser.setGroup(options);
View Full Code Here

   
    Option inputOpt = DefaultOptionCreator.inputOption().create();
    Option outputOpt = DefaultOptionCreator.outputOption().create();
    Option helpOpt = DefaultOptionCreator.helpOption();
   
    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(outputOpt).withOption(helpOpt)
        .create();
   
    try {
      Parser parser = new Parser();
      parser.setGroup(group);
View Full Code Here

    Option collapseOpt = obuilder.withLongName("collapse").withRequired(true).withArgument(
      abuilder.withName("collapse").withMinimum(1).withMaximum(1).create()).withDescription(
      "Collapse a whole directory to a single file, one doc per line").withShortName("p").create();
   
    Option helpOpt = DefaultOptionCreator.helpOption();
    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(outputOpt).withOption(labelOpt)
        .withOption(analyzerOpt).withOption(charsetOpt).withOption(collapseOpt).withOption(helpOpt).create();
    try {
      Parser parser = new Parser();
      parser.setGroup(group);
      CommandLine cmdLine = parser.parse(args);
View Full Code Here

    GroupBuilder gbuilder = new GroupBuilder();

    Option inputOpt = DefaultOptionCreator.inputOption().withRequired(false).create();
    Option outputOpt = DefaultOptionCreator.outputOption().withRequired(false).create();
    Option helpOpt = DefaultOptionCreator.helpOption();
    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(outputOpt).withOption(helpOpt).create();

    try {
      Parser parser = new Parser();
      parser.setGroup(group);
      CommandLine cmdLine = parser.parse(args);
View Full Code Here

            .withRequired(true)
            .withArgument(argumentBuilder.withName("model").withMaximum(1).create())
            .withDescription("where to get a model")
            .create();

    Group normalArgs = new GroupBuilder()
            .withOption(help)
            .withOption(inputFileOption)
            .withOption(modelFileOption)
            .create();
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");
        buttons.add(toggleRightBtn);

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

        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());
            }
        });

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

    public SimpleToggleButtonSample() {

        HorizontalPanel buttons = new HorizontalPanel();

        final SimpleToggleButton button = new SimpleToggleButton("Toggle Button");
        button.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                showMessage(button.isDown() ? "Button is down" : "Button is up");
            }
        });
        button.getDownFace().setText("Toggle Button (down)");
        buttons.add(button);

        addGap(buttons, "10px");

        final SimpleToggleButton iconButton = new SimpleToggleButton("Icon Toggle Button", WidgetImages.Instance.get().icon_Printer().createImage());
        iconButton.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                showMessage(iconButton.isDown() ? "Button is down" : "Button is up");
            }
        });
        buttons.add(iconButton);

        addGap(buttons, "10px");

        final SimpleToggleButton customButton = new SimpleToggleButton("Toggle Button Custom Width", WidgetImages.Instance.get().icon_Printer().createImage());
        customButton.setWidth("250px");
        customButton.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                showMessage(customButton.isDown() ? "Button is down" : "Button is up");
            }
        });
        buttons.add(customButton);

        addGap(buttons, "10px");

        SimpleToggleButton disabledButton = new SimpleToggleButton("Disabled Toggle Button", WidgetImages.Instance.get().icon_CubeGreen().createImage());
        disabledButton.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                showMessage("Show never be shown");
            }
        });
        disabledButton.setEnabled(false);
        buttons.add(disabledButton);

        addGap(buttons, "10px");

        SimpleToggleButton group1Button= new SimpleToggleButton("Group 1", WidgetImages.Instance.get().icon_CubeGreen().createImage());
        group1Button.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                showMessage("Group 1 was clicked");
            }
        });
        group1Button.setGroup("group");
        buttons.add(group1Button);

        addGap(buttons, "10px");

        SimpleToggleButton group2Button= new SimpleToggleButton("Group 2", WidgetImages.Instance.get().icon_CubeGreen().createImage());
        group2Button.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
                showMessage("Group 2 was clicked");
            }
        });
        group2Button.setGroup("group");
        buttons.add(group2Button);

        VerticalPanel main = new VerticalPanel();

        main.add(buttons);
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.