/** * Sets the text for the Cancel button. * * @param buttonText The text to use for the Cancel button. **/ public void setCancelButtonText(String buttonText) { cancel.setLabel(buttonText); }
/** Toggles whether the data browser is animating. */ public void toggleAnimation() { animate.setLabel(anim ? "Animate" : "Stop"); anim = !anim; }
/** * Sets the button text for the Ok button. * * @param buttonText The text to use for the Ok button. **/ public void setOkButtonText(String buttonText) { open.setLabel(buttonText); }
/** Toggles whether the data browser is animating. */ public void toggleAnimation() { animate.setLabel(anim ? "Animate" : "Stop"); anim = !anim; }
Button button2 = this.createButton(); button2.setLabel("EDIT"); profilo_2.add(button2);
public void _init(CloseButtonPanelController _controller, String _buttonLabel) { controller = _controller; buttonLabel = _buttonLabel; getCloseButton().setLabel(" "+buttonLabel+" "); } /**
protected void runFailed(String message) { showStatus(message); fRun.setLabel("Run"); fRunner= null; }
final Iterator<Button> buttonI = buttons.iterator(); final Iterator<Territory> territoryI = territories.iterator(); while (territoryI.hasNext() && buttonI.hasNext()) { final Button button = buttonI.next(); final Territory territory = territoryI.next(); button.setBackground(territory.getOwner().getColor()); button.setLabel(territory.units()); }
private void onDisconnect() { synchronized (net_lock) { mode = COMMAND_MODE; connect_button.setLabel("Connect"); accept_button.setLabel("Accept"); udp_button.setLabel("UDP"); accept_button.setEnabled(true); connect_button.setEnabled(true); udp_button.setEnabled(true); server_sock = null; sock = null; out = null; in = null; net_thread = null; } }
@Override public void actionPerformed(final ActionEvent e) { if (e.getSource() == colorButton) { if (colorChooserDisplayed) { remove(cColorChooser); colorButton.setLabel(BUTTON_ACTIVATE_COLOR_CHOOSER); colorChooserDisplayed = false; win.pack(); } else { add(cColorChooser, BorderLayout.EAST); colorButton.setLabel(BUTTON_DEACTIVATE_COLOR_CHOOSER); colorChooserDisplayed = true; win.pack(); } } }
@Override public void run() { analyzeButton.setEnabled(false); analyzeButton.setLabel("Running Analysis. Please wait..."); results.analyzeWithShollAnalysisPlugin(getExportPath(), shollpafm.getPathsStructured().length); analyzeButton.setLabel("Analyze Profile (Sholl Analysis v" + Sholl_Utils.version() + ")..."); analyzeButton.setEnabled(true); } });
public void run() { fTestResult= createTestResult(); fTestResult.addListener(TestRunner.this); fProgressIndicator.start(testSuite.countTestCases()); showInfo("Running..."); long startTime= System.currentTimeMillis(); testSuite.run(fTestResult); if (fTestResult.shouldStop()) { showStatus("Stopped"); } else { long endTime= System.currentTimeMillis(); long runTime= endTime-startTime; showInfo("Finished: " + elapsedTimeAsString(runTime) + " seconds"); } fTestResult= null; fRun.setLabel("Run"); fRunner= null; System.gc(); } };
/** * Return the ClearButton property value. * @return java.awt.Button */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private java.awt.Button getClearButton() { if (ivjClearButton == null) { try { ivjClearButton = new java.awt.Button(); ivjClearButton.setName("ClearButton"); ivjClearButton.setLabel(" Clear "); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjClearButton; } /**
/** * Return the Button1 property value. * @return java.awt.Button */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private java.awt.Button getCloseButton() { if (ivjCloseButton == null) { try { ivjCloseButton = new java.awt.Button(); ivjCloseButton.setName("CloseButton"); ivjCloseButton.setLabel(" Close "); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjCloseButton; } /**
public void setValues(Button btn,Territory t ){ btn.setLabel(t.units()); if(t.getOwner().toString().equals("Player 1")) { btn.setBackground(Color.BLUE); } else if(t.getOwner().toString().equals("Player 2")) { btn.setBackground(Color.RED); } else if (t.getOwner().toString().equals("Player 3")) { btn.setBackground(Color.GREEN); } else if (t.getOwner().toString().equals("Player 4")) { btn.setBackground(Color.YELLOW); } }
public void init() { this.setBackground (Color.lightGray); clipboard = getToolkit ().getSystemClipboard (); cmdCopy.setLabel("Copy source to clipboard"); cmdPaste.setLabel ("Paste to the destination field"); labelSource.setAlignment(Label.RIGHT); labelSource.setText("Source text"); labelDestination.setAlignment(Label.RIGHT); labelDestination.setText("Copy to the clipboard"); this.add(labelSource); this.add(sourceText); this.add(labelDestination); this.add(destinationText); this.add(cmdCopy); this.add (cmdPaste); cmdCopy.addActionListener (new cmdCopyActionListener ()); cmdPaste.addActionListener (new cmdPasteActionListener ()); }
void rename(int i) { NamedPointWorld npw = points.get(i); GenericDialog gd = new GenericDialog( "Rename Point" ); gd.addStringField( "Rename point to:", npw.getName() ); gd.showDialog(); if( gd.wasCanceled() ) return; String newName = gd.getNextString(); boolean result = points.renamePointTo( i, newName ); if( result ) { dialog.markButtons[i].setLabel( newName ); dialog.pack(); } else { IJ.error("Couldn't rename point: there already is one called \"" + newName + "\"" ); } }