Examples of SmallButton


Examples of org.apache.log4j.chainsaw.SmallButton

    final SmallButton newReceiverButton;

    private ReceiverToolbar() {
      setFloatable(false);

      SmallButton restartReceiverButton = new SmallButton(restartReceiverButtonAction);
      restartReceiverButton.setText(null);
     
      SmallButton shutdownReceiverButton =
        new SmallButton(shutdownReceiverButtonAction);
      shutdownReceiverButton.setText(null);

      SmallButton restartAllButton = new SmallButton(startAllAction);
      restartAllButton.setText(null);
     
     

      newReceiverButton = new SmallButton(newReceiverButtonAction);
      newReceiverButton.setText(null);
      newReceiverButton.addMouseListener(new PopupListener(newReceiverPopup));

      add(newReceiverButton);
      add(restartAllButton);

      addSeparator();

      add(restartReceiverButton);
      add(shutdownReceiverButton);

      addSeparator();

      Action closeAction =
        new AbstractAction(null, LineIconFactory.createCloseIcon()) {
          public void actionPerformed(ActionEvent e) {
            ReceiversPanel.this.setVisible(false);
          }
        };

      closeAction.putValue(
        Action.SHORT_DESCRIPTION, "Closes the Receiver panel");

      add(Box.createHorizontalGlue());

      add(new SmallButton(closeAction));

      add(Box.createHorizontalStrut(5));
    }
View Full Code Here

Examples of org.apache.log4j.chainsaw.SmallButton

  /**
   *
   */
  private void setupToolbar() {
    JButton clearButton = new SmallButton(clearAction);
    clearButton.setText(null);
    toolbar.add(clearButton);

    toolbar.setFloatable(false);
  }
View Full Code Here

Examples of org.apache.log4j.chainsaw.SmallButton

    final SmallButton newReceiverButton;

    private ReceiverToolbar() {
      setFloatable(false);

      SmallButton restartReceiverButton = new SmallButton(restartReceiverButtonAction);
      restartReceiverButton.setText(null);
     
      SmallButton shutdownReceiverButton =
        new SmallButton(shutdownReceiverButtonAction);
      shutdownReceiverButton.setText(null);

      SmallButton restartAllButton = new SmallButton(startAllAction);
      restartAllButton.setText(null);
     
     

      newReceiverButton = new SmallButton(newReceiverButtonAction);
      newReceiverButton.setText(null);
      newReceiverButton.addMouseListener(new PopupListener(newReceiverPopup));

      add(newReceiverButton);
      add(restartAllButton);

      addSeparator();

      add(restartReceiverButton);
      add(shutdownReceiverButton);

      addSeparator();

      Action closeAction =
        new AbstractAction(null, LineIconFactory.createCloseIcon()) {
          public void actionPerformed(ActionEvent e) {
            ReceiversPanel.this.setVisible(false);
          }
        };

      closeAction.putValue(
        Action.SHORT_DESCRIPTION, "Closes the Receiver panel");

      add(Box.createHorizontalGlue());

      add(new SmallButton(closeAction));

      add(Box.createHorizontalStrut(5));
    }
View Full Code Here

Examples of org.rstudio.core.client.widget.SmallButton

      SecondaryToolbar toolbar = new SecondaryToolbar() ;
      toolbar.addLeftPopupMenu(title_ = new Label(), history_.getMenu());
     
      if (isFindSupported())
      {
         final SmallButton btnNext = new SmallButton(">", true);
         btnNext.setTitle("Find next (Enter)");
         btnNext.setVisible(false);
         btnNext.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event)
            {
               findNext();
           
         });
        
         final SmallButton btnPrev = new SmallButton("<", true);
         btnPrev.setTitle("Find previous");
         btnPrev.setVisible(false);
         btnPrev.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event)
            {
               findPrev();
           
         });
        
        
         findTextBox_ = new FindTextBox("Find in Topic");
         findTextBox_.setOverrideWidth(90);
         toolbar.addLeftWidget(findTextBox_);
         findTextBox_.addKeyUpHandler(new KeyUpHandler() {
           
            @Override
            public void onKeyUp(KeyUpEvent event)
            {    
               WindowEx contentWindow = getContentWindow();
               if (contentWindow != null)
               {
                  // escape or tab means exit find mode and put focus
                  // into the main content window
                  if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE ||
                      event.getNativeKeyCode() == KeyCodes.KEY_TAB)
                  {
                     event.preventDefault();
                     event.stopPropagation();
                     if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE)
                        clearTerm();
                     contentWindow.focus();
                  }
                  else
                  {
                     // prevent two enter keys in rapid succession from
                     // minimizing or maximizing the help pane
                     if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
                     {
                        event.preventDefault();
                        event.stopPropagation();
                     }
                     
                     // check for term
                     String term = findTextBox_.getValue().trim();
                    
                     // if there is a term then search for it
                     if (term.length() > 0)
                     {
                        // make buttons visible
                        setButtonVisibility(true);
                       
                        // perform the find (check for incremental)
                        if (isIncrementalFindSupported())
                        {
                           boolean incremental =
                            !event.isAnyModifierKeyDown() &&
                            (event.getNativeKeyCode() != KeyCodes.KEY_ENTER);  
                          
                           performFind(term, true, incremental);
                        }
                        else
                        {
                           if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
                              performFind(term, true, false);
                        }
                     }
                    
                     // no term means clear term and remove selection
                     else
                     {
                        if (isIncrementalFindSupported())
                        {
                           clearTerm();
                           contentWindow.removeSelection();
                        }
                     }
                  }
               }
            }
           
            private void clearTerm()
            {
               findTextBox_.setValue("");
               setButtonVisibility(false);
            }
           
            private void setButtonVisibility(final boolean visible)
            {
               Scheduler.get().scheduleDeferred(new ScheduledCommand() {
                  @Override
                  public void execute()
                  {
                     btnNext.setVisible(visible);
                     btnPrev.setVisible(visible);
                  }
               });
            }
         });
      
         findTextBox_.addKeyDownHandler(new KeyDownHandler() {

            @Override
            public void onKeyDown(KeyDownEvent event)
            {
               // we handle these directly so prevent the browser
               // from handling them
               if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE ||
                   event.getNativeKeyCode() == KeyCodes.KEY_TAB ||
                   event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
               {
                  event.preventDefault();
                  event.stopPropagation();
               }
            }
           
         });
        
         if (isIncrementalFindSupported())
         {
            btnPrev.getElement().getStyle().setMarginRight(3, Unit.PX);
            toolbar.addLeftWidget(btnPrev);
            toolbar.addLeftWidget(btnNext);
         }
      
      }
View Full Code Here

Examples of org.rstudio.core.client.widget.SmallButton

         public void setToolbarContents(Toolbar toolbar)
         {
            toolbar.addLeftWidget(
               new Label("Locator active (Esc to finish)"));
           
            SmallButton doneButton = new SmallButton("Finish");
            doneButton.addClickHandler(new ClickHandler() {
               public void onClick(ClickEvent event)
               {
                  SelectionEvent.fire(LocatorPanel.this, null);
               }        
            });  
View Full Code Here

Examples of org.rstudio.core.client.widget.SmallButton

      findReplacePanel.addStyleName(RES.styles().findPanel());
      findReplacePanel.add(txtFind_ = new FindTextBox("Find"));
      txtFind_.setIconVisible(true);
     
      Commands cmds = RStudioGinjector.INSTANCE.getCommands();
      findReplacePanel.add(btnFindNext_ = new SmallButton(cmds.findNext()));
      findReplacePanel.add(btnFindPrev_ = new SmallButton(cmds.findPrevious()));
     
      findReplacePanel.add(txtReplace_ = new FindTextBox("Replace"));
      txtReplace_.addStyleName(RES.styles().replaceTextBox());
      findReplacePanel.add(btnReplace_ = new SmallButton(cmds.replaceAndFind()));
      findReplacePanel.add(btnReplaceAll_ = new SmallButton("All"));
     
      panel.add(findReplacePanel);
     
      HorizontalPanel optionsPanel = new HorizontalPanel();
      optionsPanel.addStyleName(RES.styles().optionsPanel());
View Full Code Here

Examples of org.rstudio.core.client.widget.SmallButton

      listBox_.addStyleName(RES.styles().codeFilesListBox());
      listBox_.getElement().<SelectElement>cast().setSize(3);
      dictionariesPanel.add(listBox_);
     
      VerticalPanel buttonPanel = new VerticalPanel();
      SmallButton buttonAdd = createButton("Add...");
      buttonAdd.addClickHandler(addButtonClicked_);
      buttonPanel.add(buttonAdd);
      SmallButton buttonRemove = createButton("Remove");
      buttonRemove.addClickHandler(removeButtonClicked_);
      buttonPanel.add(buttonRemove);
      dictionariesPanel.add(buttonPanel);
     
      panel.add(dictionariesPanel);
     
View Full Code Here

Examples of org.rstudio.core.client.widget.SmallButton

   };
  
   private SmallButton createButton(String caption)
   {
      SmallButton button = new SmallButton(caption);
      button.addStyleName(RES.styles().codeFilesListButton());
      button.fillWidth();
      return button;
   }
View Full Code Here

Examples of org.rstudio.core.client.widget.SmallButton

      listBox_.addStyleName(RES.styles().listBox());
      listBox_.getElement().<SelectElement>cast().setSize(4);
      dictionariesPanel.add(listBox_);
     
      VerticalPanel buttonPanel = new VerticalPanel();
      SmallButton buttonAdd = createButton("Add...");
      buttonAdd.addClickHandler(addButtonClicked_);
      buttonPanel.add(buttonAdd);
      SmallButton buttonRemove = createButton("Remove...");
      buttonRemove.addClickHandler(removeButtonClicked_);
      buttonPanel.add(buttonRemove);
      dictionariesPanel.add(buttonPanel);
     
      panel.add(dictionariesPanel);
     
View Full Code Here

Examples of org.rstudio.core.client.widget.SmallButton

      }
   };
  
   private SmallButton createButton(String caption)
   {
      SmallButton button = new SmallButton(caption);
      button.addStyleName(RES.styles().button());
      button.fillWidth();
      return button;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.