本文整理了Java中java.awt.Button.setEnabled()
方法的一些代码示例,展示了Button.setEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setEnabled()
方法的具体详情如下:
包路径:java.awt.Button
类名称:Button
方法名:setEnabled
暂无
代码示例来源:origin: edu.ucar/opendap
/**
* A helper method to enable or disable the other buttons while the user
* is downloading, so they don't click multiple times.
*
* @param b if true, enable the buttons; else, disable them.
*/
private void setButtonsEnabled(boolean b) {
getDASButton.setEnabled(b);
getDDSButton.setEnabled(b);
getDataButton.setEnabled(b);
}
代码示例来源:origin: org.apfloat/apfloat-samples
public void actionPerformed(ActionEvent actionEvent)
{
PiAWT.this.abortButton.setEnabled(false);
stopThread();
}
});
代码示例来源:origin: sc.fiji/FlowJ_
/**
* Activate the rendering buttons, depending on whether or
* not there is a stack, an image, or nothing available.
* @param listLength the number of stacks available.
*/
protected void activateButtons(int listLength)
{
render.setEnabled(listLength > 0);
renderStereo.setEnabled(listLength > 0);
renderCine.setEnabled(listLength > 0);
}
public void keyReleased(KeyEvent e) {}
代码示例来源:origin: de.jflex/jflex
private void setEnabledAll(boolean generating) {
stop.setEnabled(generating);
quit.setEnabled(!generating);
generate.setEnabled(!generating);
dirChoose.setEnabled(!generating);
dir.setEnabled(!generating);
specChoose.setEnabled(!generating);
spec.setEnabled(!generating);
}
代码示例来源:origin: sc.fiji/VIB-lib
public void setCoordinateLabel(int i, double x, double y, double z) {
DecimalFormat f = new DecimalFormat("0.000");
String newText = "";
newText += "x: " + f.format(x) + ", y: " + f.format(y) + ", z: " + f.format(z);
coordinateLabels[i].setText(newText);
showButtons[i].setEnabled(true);
resetButtons[i].setEnabled(true);
}
代码示例来源:origin: sc.fiji/VIB-lib
public void reset(int i) {
assert i>0;
assert i<coordinateLabels.length;
coordinateLabels[i].setText("<unset>");
showButtons[i].setEnabled(false);
resetButtons[i].setEnabled(false);
pack();
}
代码示例来源:origin: IanDarwin/javasrc
public void actionPerformed(ActionEvent e) {
login();
loginButton.setEnabled(false);
logoutButton.setEnabled(true);
tf.requestFocus(); // set keyboard focus in right place!
}
});
代码示例来源:origin: sc.fiji/FlowJ_
/**
* Activate the rendering and surface plot buttons, depending on whether or
* not there is a stack, an image, or nothing available.
* @param listLength the number of stacks available when VolumeJ started.
*/
@Override
protected void activateButtons(int listLength)
{
ImagePlus imp = WindowManager.getCurrentImage();
renderSurfaceplot.setEnabled(imp instanceof ImagePlus);
}
/**
代码示例来源:origin: IanDarwin/javasrc
public void actionPerformed(ActionEvent e) {
logout();
loginButton.setEnabled(true);
logoutButton.setEnabled(false);
loginButton.requestFocus();
}
});
代码示例来源:origin: org.apfloat/apfloat-samples
private void end()
{
this.abortButton.setEnabled(false);
this.goButton.setEnabled(true);
ApfloatContext ctx = ApfloatContext.getContext();
BuilderFactory builderFactory = ctx.getBuilderFactory();
builderFactory.gc(); // Garbage collection may not have run perfectly by this point
}
代码示例来源:origin: org.junit/com.springsource.junit
public void textValueChanged(TextEvent e) {
fRun.setEnabled(fSuiteField.getText().length() > 0);
fStatusLine.setText("");
}
}
代码示例来源:origin: org.junit/com.springsource.junit
public void failureSelected() {
fRerunButton.setEnabled(isErrorSelected());
showErrorTrace();
}
代码示例来源:origin: sc.fiji/Simple_Neurite_Tracer
@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);
}
});
代码示例来源:origin: sc.fiji/Threshold_Colour
public void windowActivated(WindowEvent e) {
if (checkImage()) {
ip = setup(WindowManager.getCurrentImage());
//reset(imp,ip); // v 1.13
filteredB.setEnabled(true);
}
}
代码示例来源:origin: org.junit/com.springsource.junit
protected void reset() {
setLabelValue(fNumberOfErrors, 0);
setLabelValue(fNumberOfFailures, 0);
setLabelValue(fNumberOfRuns, 0);
fProgressIndicator.reset();
fRerunButton.setEnabled(false);
fFailureList.removeAll();
fExceptions= new Vector(10);
fFailedTests= new Vector(10);
fTraceArea.setText("");
}
代码示例来源:origin: sc.fiji/Image_5D
/**
* Called from ChannelControl when active channel changes.
*/
public void channelChanged() {
cColorCanvas.repaint();
displayGrayBox.setState(i5d.getChannelDisplayProperties(
cControl.currentChannel).isDisplayedGray());
cColorCanvas.setEnabled(!displayGrayBox.getState());
editColorButton.setEnabled(!displayGrayBox.getState());
editLUTButton.setEnabled(!displayGrayBox.getState());
}
代码示例来源:origin: org.apfloat/apfloat-samples
public void actionPerformed(ActionEvent actionEvent)
{
if (isInputValid())
{
PiAWT.this.statusArea.getText(); // FIXME: workaround for Java bug 9008097, to be removed
PiAWT.this.resultArea.getText(); // FIXME: workaround for Java bug 9008097, to be removed
PiAWT.this.statusArea.setText(null);
PiAWT.this.resultArea.setText(null);
PiAWT.this.goButton.setEnabled(false);
startThread();
}
}
});
代码示例来源:origin: sc.fiji/Image_5D
@Override
public void itemStateChanged(final ItemEvent e) {
if (e.getItemSelectable() == displayGrayBox) {
i5d.storeChannelProperties(cControl.currentChannel);
i5d.getChannelDisplayProperties(cControl.currentChannel)
.setDisplayedGray(displayGrayBox.getState());
i5d.restoreChannelProperties(cControl.currentChannel);
i5d.updateImageAndDraw();
cColorCanvas.setEnabled(!displayGrayBox.getState());
editColorButton.setEnabled(!displayGrayBox.getState());
editLUTButton.setEnabled(!displayGrayBox.getState());
}
}
代码示例来源:origin: net.imagej/ij
public void windowActivated(WindowEvent e) {
if (IJ.debugMode) IJ.log("ColorThresholder.windowActivated ");
ImagePlus imp = WindowManager.getCurrentImage();
if (imp==null || imp.getBitDepth()!=24) {
IJ.beep();
IJ.showStatus("No RGB image");
} else {
setup(imp);
//reset(imp);
filteredB.setEnabled(true);
}
}
代码示例来源:origin: imagej/ImageJA
public void windowActivated(WindowEvent e) {
if (IJ.debugMode) IJ.log("ColorThresholder.windowActivated ");
ImagePlus imp = WindowManager.getCurrentImage();
if (imp==null || imp.getBitDepth()!=24) {
IJ.beep();
IJ.showStatus("No RGB image");
} else {
setup(imp);
//reset(imp);
filteredB.setEnabled(true);
}
}
内容来源于网络,如有侵权,请联系作者删除!