Package net.geco.ui.basics

Examples of net.geco.ui.basics.StartStopButton


      }
    });
    toolBar.add(liveMapB);
    final ImageIcon offliveIcon = createIcon(8);
    final ImageIcon onliveIcon = createIcon(9);
    StartStopButton liveClientB = new StartStopButton() {
      private LiveClient liveClient;
      @Override
      public void initialize() {
        setIcon(offliveIcon);
        setToolTipText(Messages.uiGet("GecoWindow.StartLiveclientTooltip")); //$NON-NLS-1$
View Full Code Here


  }

  private void initReaderToolbar(JToolBar toolBar) {
    final ImageIcon autoOff = createIcon(12);
    final ImageIcon autoOn = createIcon(13);
    final StartStopButton autoModeB = new StartStopButton() {
      @Override
      public void initialize() {
        doOnAction();
      }
      @Override
      public void actionOn() {
        geco.siHandler().setRequestHandler(geco.autoMergeHandler());
        setIcon(autoOn);
        setToolTipText(Messages.uiGet("GecoWindow.AutoMergeTooltip")); //$NON-NLS-1$
      }
      @Override
      public void actionOff() {
        geco.siHandler().setRequestHandler(geco.defaultMergeHandler());
        setIcon(autoOff);
        setToolTipText(Messages.uiGet("GecoWindow.ManualMergeTooltip")); //$NON-NLS-1$
      }
    };
    toolBar.add(autoModeB);
   
    final ImageIcon splitOff = createIcon(10);
    final ImageIcon splitOn = createIcon(11);
    final StartStopButton autoSplitB = new StartStopButton() {
      @Override
      public void initialize() {
        setToolTipText(Messages.uiGet("GecoWindow.AutoprintTooltip")); //$NON-NLS-1$
        doOffAction();
      }
      @Override
      public void actionOn() {
        setIcon(splitOn);
        geco.splitPrinter().enableAutoprint();
      }
      @Override
      public void actionOff() {
        geco.splitPrinter().disableAutoprint();
        setIcon(splitOff);
      }
    };
    toolBar.add(autoSplitB);
   
    final ImageIcon startIcon = createIcon(5);
    final ImageIcon stopIcon = createIcon(6);
    startB = new StartStopButton() {
      @Override
      public void initialize() {
        setSelected(false);
        setText(Messages.uiGet("GecoWindow.StartReaderButton")); //$NON-NLS-1$
        setIcon(startIcon);
      }
      @Override
      public void actionOn() {
        if( ! autoSplitB.isSelected() ) {
          int confirm = JOptionPane.showConfirmDialog(
                        GecoWindow.this,
                        Messages.uiGet("GecoWindow.AutoprintConfirm1"), //$NON-NLS-1$
                        Messages.uiGet("GecoWindow.AutoprintConfirm2"), //$NON-NLS-1$
                        JOptionPane.YES_NO_OPTION);
          if( confirm==JOptionPane.YES_OPTION ) {
            autoSplitB.doOnAction();
          }
        }
        geco.siHandler().start();
        setText(Messages.uiGet("GecoWindow.StartingButton")); //$NON-NLS-1$
        setIcon(stopIcon);       
View Full Code Here

    DecimalFormat format = new DecimalFormat();
    format.setGroupingUsed(false);
    portF = new JFormattedTextField(format);
    portF.setText("4444"); //$NON-NLS-1$
    portF.setColumns(5);
    listenB = new StartStopButton() {
      private Color defaultColor;
      LiveServerMulti server;
      @Override
      public void actionOn() {
        try {
View Full Code Here

TOP

Related Classes of net.geco.ui.basics.StartStopButton

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.