Package org.oxbow.swingbits.dialog.task.design

Examples of org.oxbow.swingbits.dialog.task.design.CommandLinkButtonGroup


          getIcon(null), // null by default, according to MS ux guidlines
          instruction,
          text);
     
      dlg.setCommands( StandardCommand.CANCEL );
      final CommandLinkButtonGroup bGroup = new CommandLinkButtonGroup();
     
        final List<ButtonModel> models = new ArrayList<ButtonModel>();
        final List<CommandLinkButton> buttons = new ArrayList<CommandLinkButton>();

        CommandLinkButton btn;
      JPanel p = new JPanel( new MigLayout(""));
      p.setOpaque(false);
      for( CommandLink link: choices ) {
        btn = new CommandLinkButton(link, TaskDialog.getDesign().getCommandLinkPainter() );
        models.add( btn.getModel());
        buttons.add( btn );
        bGroup.add(btn);
        p.add( btn, "dock north, gapbottom 8");
      }

      if ( defaultChoice >= 0 && defaultChoice < choices.size()) {
        bGroup.setSelected(models.get(defaultChoice), true);

        // make sure that selected button is focused
        p.addAncestorListener( new AncestorAdapter() {

          @Override
View Full Code Here

TOP

Related Classes of org.oxbow.swingbits.dialog.task.design.CommandLinkButtonGroup

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.