Пример #1
0
 /**
  * Handles when the mouse enters or leaves a palette button.
  *
  * @see PaletteListener
  */
 public void paletteUserOver(PaletteButton button, boolean inside) {
   ToolButton toolButton = (ToolButton) button;
   if (inside) {
     showStatus(toolButton.name());
   } else {
     showStatus(fSelectedToolButton.name());
   }
 }
Пример #2
0
 private void setSelected(ToolButton button) {
   if (fSelectedToolButton != null) {
     fSelectedToolButton.reset();
   }
   fSelectedToolButton = button;
   if (fSelectedToolButton != null) {
     fSelectedToolButton.select();
   }
 }
Пример #3
0
 public void paletteUserOver(PaletteButton button, boolean inside) {
   if (inside) {
     showStatus(button.name());
   } else if (fSelectedToolButton != null) {
     showStatus(fSelectedToolButton.name());
   }
 }
Пример #4
0
 /**
  * Sets the default tool of the editor.
  *
  * @see DrawingEditor
  */
 public void toolDone() {
   setTool(fDefaultToolButton.tool(), fDefaultToolButton.name());
   setSelected(fDefaultToolButton);
 }
Пример #5
0
 /**
  * Handles a user selection in the palette.
  *
  * @see PaletteListener
  */
 public void paletteUserSelected(PaletteButton button) {
   ToolButton toolButton = (ToolButton) button;
   setTool(toolButton.tool(), toolButton.name());
   setSelected(toolButton);
 }
Пример #6
0
 private void editMode(boolean enabled) {
   separator.setVisible(enabled);
   btnOk.setVisible(enabled);
   btnCancel.setVisible(enabled);
   lblChangedMsg.setVisible(enabled);
 }