本文整理了Java中javax.swing.JCheckBox.isEnabled()
方法的一些代码示例,展示了JCheckBox.isEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.isEnabled()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:isEnabled
暂无
代码示例来源:origin: magefree/mage
if (dialog.cbUseRandomBattleImage.isEnabled()) {
if (prop.equals("true")) {
dialog.cbUseRandomBattleImage.setSelected(true);
代码示例来源:origin: DSpace/DSpace
/**
* Determine if the MD5 hash should be corrupted.
* @return True if the corrupt MD5 checkbox is selected. The MD5 checkbox
* must also be selected.
*/
public boolean corruptMD5() {
return (corruptMD5.isEnabled() && corruptMD5.isSelected());
}
代码示例来源:origin: chatty/chatty
/**
* Whether rejoining open channels is active and selected.
*
* @return {@code true} if open channels should be rejoined, {@code false}
* otherwise
*/
public boolean rejoinOpenChannels() {
return rejoinOpenChannels.isEnabled() && rejoinOpenChannels.isSelected();
}
代码示例来源:origin: com.fifesoft.rtext/fife.common
/**
* Sets or clears the "Underline" check box.
* Note that if this dialog was created such that "Underline" is not
* selectable, this method does nothing.
*
* @param underline Whether or not the Underline check box should be
* selected.
* @see #getUnderlineSelected
*/
public void setUnderlineSelected(boolean underline) {
if (underlineCheckBox.isEnabled())
underlineCheckBox.setSelected(underline);
}
代码示例来源:origin: stackoverflow.com
public void disableBoxes() {
for (JCheckBox j : ArrayOfJCheckBox) {
if (j.isEnabled()) {
j.setEnabled(false);
}
}
}
代码示例来源:origin: org.swordapp/sword-common
/**
* Determine if the MD5 hash should be corrupted.
* @return True if the corrupt MD5 checkbox is selected. The MD5 checkbox
* must also be selected.
*/
public boolean corruptMD5()
{
return (corruptMD5.isEnabled() && corruptMD5.isSelected());
}
代码示例来源:origin: org.dspace/dspace-sword-api
/**
* Determine if the MD5 hash should be corrupted.
* @return True if the corrupt MD5 checkbox is selected. The MD5 checkbox
* must also be selected.
*/
public boolean corruptMD5()
{
return (corruptMD5.isEnabled() && corruptMD5.isSelected());
}
代码示例来源:origin: org.cytoscape/network-analyzer-impl
/**
* Updates the "enabled" status of the "OK" button.
*/
private void updateOKButton() {
boolean enable = false;
if (union.isEnabled() || intersect.isEnabled() || diff.isEnabled()) {
int[] indices = listNetNames.getSelectedIndices();
enable = (indices.length == 2);
}
btnOK.setEnabled(enable);
}
代码示例来源:origin: chatty/chatty
/**
* Enables or disables the channel inputbox depending on whether the rejoin
* open channels option is active and selected.
*/
private void updateChannels() {
channel.setEnabled(!rejoinOpenChannels.isEnabled() || !rejoinOpenChannels.isSelected());
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards
private void windowPosChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_windowPosChanged
cbKeepPrefSize.setEnabled( !("editor".equals( comMode.getSelectedItem()) ) );
if( !cbKeepPrefSize.isEnabled() )
cbKeepPrefSize.setSelected( false );
cbSlidingNotAllowed.setEnabled( !("editor".equals( comMode.getSelectedItem()) ) );
if( !cbSlidingNotAllowed.isEnabled() )
cbSlidingNotAllowed.setSelected( false );
}//GEN-LAST:event_windowPosChanged
代码示例来源:origin: us.ihmc/IHMCAvatarInterfaces
@Override
public void stateChanged(ChangeEvent e)
{
boolean isNetworkProcessorSelected = moduleCheckBoxes.get(Modules.NETWORK_PROCESSOR).isSelected();
boolean isNetworkProcessorEnabled = moduleCheckBoxes.get(Modules.NETWORK_PROCESSOR).isEnabled();
moduleCheckBoxes.get(Modules.BEHAVIOR_MODULE).setEnabled(isNetworkProcessorSelected && isNetworkProcessorEnabled);
moduleCheckBoxes.get(Modules.SENSOR_MODULE).setEnabled(isNetworkProcessorSelected && isNetworkProcessorEnabled);
moduleCheckBoxes.get(Modules.ZERO_POSE_PRODUCER).setEnabled(isNetworkProcessorSelected && isNetworkProcessorEnabled);
moduleCheckBoxes.get(Modules.ROS_MODULE).setEnabled(isNetworkProcessorSelected && isNetworkProcessorEnabled);
}
};
代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge
@Override
public void stateChanged(ChangeEvent e)
{
boolean isNetworkProcessorSelected = moduleCheckBoxes.get(Modules.NETWORK_PROCESSOR).isSelected();
boolean isNetworkProcessorEnabled = moduleCheckBoxes.get(Modules.NETWORK_PROCESSOR).isEnabled();
moduleCheckBoxes.get(Modules.BEHAVIOR_MODULE).setEnabled(isNetworkProcessorSelected && isNetworkProcessorEnabled);
moduleCheckBoxes.get(Modules.SENSOR_MODULE).setEnabled(isNetworkProcessorSelected && isNetworkProcessorEnabled);
moduleCheckBoxes.get(Modules.ZERO_POSE_PRODUCER).setEnabled(isNetworkProcessorSelected && isNetworkProcessorEnabled);
moduleCheckBoxes.get(Modules.ROS_MODULE).setEnabled(isNetworkProcessorSelected && isNetworkProcessorEnabled);
}
};
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
public void setIsSorted(boolean b) {
if (bSort.isEnabled()) {
sc.setIsSorted(b);
}
}
代码示例来源:origin: datacleaner/DataCleaner
@Override
public void actionPerformed(final ActionEvent e) {
for (final JCheckBox cb : _checkBoxes.values()) {
if (cb.isEnabled()) {
cb.setSelected(true);
}
}
fireValueChanged();
}
};
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
public void setIsLogScale(boolean b, ChartAxis axis) {
if ((axis == ChartAxis.Y && !bLogY.isEnabled()) || (axis == ChartAxis.X && !bLogX.isEnabled())) {
return;
}
sc.setIsLogScale(b, axis);
bLogY.setSelected(sc.isLogScaleY());
bLogX.setSelected(sc.isLogScaleX());
}
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
public void setIsPie(boolean b) {
if (bPie.isEnabled()) {
sc.setIsPie(!sc.isPie());
bPie.setSelected(sc.isPie());
if (b) {
bOriginal.setEnabled(false);
} else {
bOriginal.setEnabled(true);
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
private void fileInfoCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileInfoCheckBoxActionPerformed
HgModuleConfig.getDefault().setShowFileInfo( fileInfoCheckBox.isSelected() && fileInfoCheckBox.isEnabled());
if (summaryView != null) {
summaryView.refreshView();
}
}//GEN-LAST:event_fileInfoCheckBoxActionPerformed
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
public void setDoesCompareToOriginal(boolean b) {
if (bOriginal.isEnabled()) {
sc.setDoesCompareToOriginal(!sc.doesCompareToOriginal());
bOriginal.setSelected(sc.doesCompareToOriginal());
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-core
protected boolean isSegment() {
if (getSegmentBox() == null ) {
return false;
}
return getSegmentBox().isSelected() && getSegmentBox().isEnabled();
}
代码示例来源:origin: triplea-game/triplea
@Test
public void build() {
final JCheckBox box = JCheckBoxBuilder.builder()
.build();
MatcherAssert.assertThat(box.isEnabled(), Is.is(true));
MatcherAssert.assertThat(box.isSelected(), Is.is(true));
}
内容来源于网络,如有侵权,请联系作者删除!