本文整理了Java中javax.swing.JCheckBox.updateUI()
方法的一些代码示例,展示了JCheckBox.updateUI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.updateUI()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:updateUI
暂无
代码示例来源:origin: senbox-org/snap-desktop
private void updateUI() {
selectAllCheckBox.setSelected(numSelected == checkBoxes.length);
selectAllCheckBox.setEnabled(numSelected < checkBoxes.length);
selectAllCheckBox.updateUI();
selectNoneCheckBox.setSelected(numSelected == 0);
selectNoneCheckBox.setEnabled(numSelected > 0);
selectNoneCheckBox.updateUI();
}
代码示例来源:origin: bcdev/beam
public void updateCheckBoxStates() {
selectAllCheckBox.setSelected(numSelected == checkBoxes.length);
selectAllCheckBox.setEnabled(numSelected < checkBoxes.length);
selectAllCheckBox.updateUI();
selectNoneCheckBox.setSelected(numSelected == 0);
selectNoneCheckBox.setEnabled(numSelected > 0);
selectNoneCheckBox.updateUI();
}
代码示例来源:origin: senbox-org/snap-desktop
public void updateCheckBoxStates() {
selectAllCheckBox.setSelected(numSelected == checkBoxes.length);
selectAllCheckBox.setEnabled(numSelected < checkBoxes.length);
selectAllCheckBox.updateUI();
selectNoneCheckBox.setSelected(numSelected == 0);
selectNoneCheckBox.setEnabled(numSelected > 0);
selectNoneCheckBox.updateUI();
}
代码示例来源:origin: bcdev/beam
private void updateUI() {
_selectAllCheckBox.setSelected(_numSelected == _checkBoxes.length);
_selectAllCheckBox.setEnabled(_numSelected < _checkBoxes.length);
_selectAllCheckBox.updateUI();
_selectNoneCheckBox.setSelected(_numSelected == 0);
_selectNoneCheckBox.setEnabled(_numSelected > 0);
_selectNoneCheckBox.updateUI();
}
代码示例来源:origin: bcdev/beam
public void updateCheckBoxStates() {
final TreePath[] selectionPaths = checkBoxTree.getCheckBoxTreeSelectionModel().getSelectionPaths();
if (selectionPaths == null || selectionPaths.length == 0) {
selectAllCheckBox.setSelected(false);
selectAllCheckBox.setEnabled(true);
selectAllCheckBox.updateUI();
selectNoneCheckBox.setSelected(true);
selectNoneCheckBox.setEnabled(false);
selectNoneCheckBox.updateUI();
} else {
final TreePath rootPath = new TreePath(checkBoxTree.getModel().getRoot());
boolean allSelected = false;
for (TreePath selectionPath : selectionPaths) {
if (selectionPath.equals(rootPath)) {
allSelected = true;
}
selectAllCheckBox.setSelected(allSelected);
selectAllCheckBox.setEnabled(!allSelected);
selectAllCheckBox.updateUI();
selectNoneCheckBox.setSelected(false);
selectNoneCheckBox.setEnabled(true);
selectNoneCheckBox.updateUI();
}
}
}
代码示例来源:origin: senbox-org/snap-desktop
public void updateCheckBoxStates() {
final TreePath[] selectionPaths = checkBoxTree.getCheckBoxTreeSelectionModel().getSelectionPaths();
if (selectionPaths == null || selectionPaths.length == 0) {
selectAllCheckBox.setSelected(false);
selectAllCheckBox.setEnabled(true);
selectAllCheckBox.updateUI();
selectNoneCheckBox.setSelected(true);
selectNoneCheckBox.setEnabled(false);
selectNoneCheckBox.updateUI();
} else {
final TreePath rootPath = new TreePath(checkBoxTree.getModel().getRoot());
boolean allSelected = false;
for (TreePath selectionPath : selectionPaths) {
if (selectionPath.equals(rootPath)) {
allSelected = true;
}
selectAllCheckBox.setSelected(allSelected);
selectAllCheckBox.setEnabled(!allSelected);
selectAllCheckBox.updateUI();
selectNoneCheckBox.setSelected(false);
selectNoneCheckBox.setEnabled(true);
selectNoneCheckBox.updateUI();
}
}
}
代码示例来源:origin: org.jspresso.framework/jspresso-swing-application
/**
* Notification from the {@code UIManager} that the look and feel [L&F]
* has changed. Replaces the current UI object with the latest version from
* the {@code UIManager}.
*/
@Override
public void updateUI() {
super.updateUI();
setForeground(null);
setBackground(null);
}
代码示例来源:origin: org.jspresso/jspresso-swing-application
/**
* Notification from the <code>UIManager</code> that the look and feel [L&F]
* has changed. Replaces the current UI object with the latest version from
* the <code>UIManager</code>.
*/
@Override
public void updateUI() {
super.updateUI();
setForeground(null);
setBackground(null);
}
代码示例来源:origin: com.jidesoft/jide-oss
@Override
public void updateUI() {
super.updateUI();
if (isMixed()) {
adjustMixedIcon();
}
else {
restoreMixedIcon();
}
}
内容来源于网络,如有侵权,请联系作者删除!