/** * @return Panel with close button. */ private JPanel createButtonPanel() { closeBtn.setAction(closeAct); closeBtn.setToolTipText("<html><b>Closes</b> Dialog</html>"); JPanel btnPanel = new JPanel(); btnPanel.add(closeBtn); return btnPanel; }
REPLACE_BUTTON.setAction(action);
adjust5.setText(""); adjust1.setAction(rapidActions.get(0)); adjust3.setAction(rapidActions.get(1)); adjust4.setAction(rapidActions.get(2)); } else { adjust2.setEnabled(true); adjust1.setAction(actions.get(0)); adjust2.setAction(actions.get(1)); adjust3.setAction(actions.get(2)); adjust4.setAction(actions.get(3)); adjust5.setAction(actions.get(4));
rapidRadio.addActionListener((ActionEvent ae) -> radioSelected()); toggleSpindle.setAction(new RealTimeAction("spindle", Overrides.CMD_TOGGLE_SPINDLE, backend)); toggleSpindle.setBackground(Color.RED); toggleFloodCoolant.setAction(new RealTimeAction("flood", Overrides.CMD_TOGGLE_FLOOD_COOLANT, backend)); toggleFloodCoolant.setBackground(Color.RED); toggleMistCoolant.setAction(new RealTimeAction("mist", Overrides.CMD_TOGGLE_MIST_COOLANT, backend)); toggleMistCoolant.setBackground(Color.RED);
public void setActuatorName(String actuatorName) { this.actuatorName = actuatorName; if (actuatorName == null || actuatorName.trim().length() == 0) { buttonCaptureTool.setAction(captureToolCoordinatesAction); buttonCenterTool.setAction(positionToolAction); } else { buttonCaptureTool.setAction(captureActuatorCoordinatesAction); buttonCenterTool.setAction(positionActuatorAction); } }
/** * Updates the toggle button to contain the Icon <code>icon</code>, and * Action <code>action</code>. */ private void updateToggleButton(Action action, Icon icon) { toggleButton.setAction(action); toggleButton.setIcon(icon); toggleButton.setText(null); }
/** * @return Panel with close button. */ private JPanel createButtonPanel() { closeBtn.setAction(closeAct); closeBtn.setToolTipText("<html><b>Closes</b> Dialog</html>"); JPanel btnPanel = new JPanel(); btnPanel.add(closeBtn); return btnPanel; }
@Override public void propertyChange(final PropertyChangeEvent evt) { if (evt.getPropertyName().equals(PROPERTY_ROUTER_CONNECTED)) { logger.debug("Connection state changed to " + evt.getNewValue()); if (evt.getNewValue().equals(Boolean.TRUE)) { connectDisconnectButton.setAction(actionMap.get(ACTION_DISCONNECT_ROUTER)); } else { connectDisconnectButton.setAction(actionMap.get(ACTION_CONNECT_ROUTER)); } } } });
/** * Creates new form GridSearchView */ public GridSearchView(ModelGrid aGrid) { initComponents(); grid = aGrid; //grid.getRowsSelectionModel().addListSelectionListener(this); btnClose.setAction(closeAction); btnFind.setAction(findAction); txtText2Find.setAction(new SurrogateFindAction()); txtText2Find.getDocument().addDocumentListener(new SearchViewDocumentListener()); }
@Override protected void bind() { super.bind(); searchField .addActionListener(getAction(JXDialog.EXECUTE_ACTION_COMMAND)); findNext.setAction(getAction(FIND_NEXT_ACTION_COMMAND)); findPrevious.setAction(getAction(FIND_PREVIOUS_ACTION_COMMAND)); KeyStroke stroke = KeyStroke.getKeyStroke("ESCAPE"); getInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(stroke, JXDialog.CLOSE_ACTION_COMMAND); }
@Override protected void bind() { super.bind(); searchField .addActionListener(getAction(JXDialog.EXECUTE_ACTION_COMMAND)); findNext.setAction(getAction(FIND_NEXT_ACTION_COMMAND)); findPrevious.setAction(getAction(FIND_PREVIOUS_ACTION_COMMAND)); KeyStroke stroke = KeyStroke.getKeyStroke("ESCAPE"); getInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(stroke, JXDialog.CLOSE_ACTION_COMMAND); }
private void setAcceleratorAction(final JButton button, final KeyStroke ks) { final Action setAcceleratorAction = new SetFKeyAcceleratorOnNextClickAction(ks); button.setAction(setAcceleratorAction); button.setEnabled(setAcceleratorAction.isEnabled()); final String text = TextUtils.getText("f_button_unassigned"); button.setText(text); }
public void actionPerformed(ActionEvent actionEvent) { try { stopAction.setEnabled(false); jettyManager.stopServer(); portField.setEnabled(true); startAction.setEnabled(true); startStop.setAction(startAction); } catch (Exception e) { throw new RuntimeException(); } } };
private void addRestoreButton() { JButton restoreButton = getRestoreButton(); restoreAction.setDialog(this); restoreAction.setTexts(texts); restoreButton.setVisible(true); restoreButton.setAction(restoreAction); }
@Override public void setAction( Action a ) { super.setAction( a ); UpdateNotifier.instance().addActionComponent( this ); ToolTipManager.sharedInstance().registerComponent( this ); }
@Override public void actionPerformed(ActionEvent arg0) { btnMeasure.setAction(confirmMeasureAction); cancelMeasureAction.setEnabled(true); CameraView cameraView = MainFrame.get().getCameraViews().setSelectedCamera(camera); cameraView.setSelectionEnabled(true); cameraView.setSelection(0, 0, 100, 100); } };
@Override public void actionPerformed(ActionEvent e) { startLensCalibrationBtn.setAction(startCalibration); referenceCamera.cancelCalibration(); CameraView cameraView = MainFrame.get().getCameraViews().getCameraView(referenceCamera); cameraView.setText(null); cameraView.flash(); } };
@Override public void actionPerformed(ActionEvent e) { btnAutoSetup.setAction(autoSetup); CameraView cameraView = MainFrame.get() .getCameraViews() .getCameraView(autoSetupCamera); cameraView.setText(null); cameraView.setCameraViewFilter(null); cameraView.removeActionListener(autoSetupPart1Clicked); cameraView.removeActionListener(autoSetupPart2Clicked); } };
@Override public void actionPerformed(ActionEvent arg0) { UiUtils.messageBoxOnException(() -> { Camera camera = MainFrame.get().getMachineControls().getSelectedTool().getHead() .getDefaultCamera(); CameraView cameraView = MainFrame.get().getCameraViews().setSelectedCamera(camera); btnChangeTemplateImage.setAction(selectTemplateImageAction); cancelSelectTemplateImageAction.setEnabled(false); cameraView.setSelectionEnabled(false); }); } };