本文整理了Java中javax.swing.JTextArea.isEnabled()
方法的一些代码示例,展示了JTextArea.isEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.isEnabled()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:isEnabled
暂无
代码示例来源:origin: senbox-org/snap-desktop
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (textArea.isEnabled()) {
textArea.setBackground(Color.WHITE);
} else {
textArea.setBackground(new Color(240, 240, 240));
}
}
});
代码示例来源:origin: bcdev/beam
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (textArea.isEnabled()) {
textArea.setBackground(Color.WHITE);
} else {
textArea.setBackground(new Color(240, 240, 240));
}
}
});
代码示例来源:origin: Petikoch/Java_MVVM_with_Swing_and_RxJava_Examples
@Override
public boolean isEnabled() {
GuiPreconditions.assertOnAwtEdt();
return super.isEnabled();
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void propertyChange(PropertyChangeEvent evt) {
if ("font".equals(evt.getPropertyName())) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// remember the caret location - issue 404
int caretPos = textArea.getCaretPosition();
textArea.updateUI();
textArea.setCaretPosition(caretPos);
Container parent = textArea.getParent();
if (parent != null) {
parent.invalidate();
parent.validate();
}
}
});
}
if ("componentOrientation".equals(evt.getPropertyName())) {
// fix by Davide Raccagni (A03)
getComponent().setText(getComponent().getText());
}
if ("enabled".equals(evt.getPropertyName())) {
transitionModel.setEnabled(textArea.isEnabled());
}
}
};
代码示例来源:origin: org.java.net.substance/substance
public void propertyChange(PropertyChangeEvent evt) {
if ("font".equals(evt.getPropertyName())) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
// remember the caret location - issue 404
int caretPos = textArea.getCaretPosition();
textArea.updateUI();
textArea.setCaretPosition(caretPos);
Container parent = textArea.getParent();
if (parent != null) {
parent.invalidate();
parent.validate();
}
}
});
}
if ("componentOrientation".equals(evt.getPropertyName())) {
// fix by Davide Raccagni (A03)
getComponent().setText(getComponent().getText());
}
if ("enabled".equals(evt.getPropertyName())) {
transitionModel.setEnabled(textArea.isEnabled());
}
}
};
代码示例来源:origin: robward-scisys/sldeditor
/**
* Checks if is enabled.
*
* @return true, if is enabled
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#isEnabled()
*/
@Override
public boolean isEnabled() {
if ((attributeSelectionPanel != null) && !isValueOnly()) {
return attributeSelectionPanel.isEnabled();
} else {
if (textArea != null) {
return textArea.isEnabled();
}
}
return false;
}
代码示例来源:origin: robward-scisys/sldeditor
/**
* Checks if is enabled.
*
* @return true, if is enabled
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#isEnabled()
*/
@Override
public boolean isEnabled() {
if ((attributeSelectionPanel != null) && !isValueOnly()) {
return attributeSelectionPanel.isEnabled();
} else {
if (textField != null) {
return textField.isEnabled();
}
}
return false;
}
代码示例来源:origin: org.tentackle/tentackle-swing
if (!c.isEnabled()) {
newColor = disabledBG;
代码示例来源:origin: com.github.insubstantial/substance
/**
* Simple constructor.
*
* @param c
* Component (text area).
*/
public SubstanceTextAreaUI(JComponent c) {
super();
this.textArea = (JTextArea) c;
this.transitionModel = new DefaultButtonModel();
this.transitionModel.setArmed(false);
this.transitionModel.setSelected(false);
this.transitionModel.setPressed(false);
this.transitionModel.setRollover(false);
this.transitionModel.setEnabled(this.textArea.isEnabled());
this.stateTransitionTracker = new StateTransitionTracker(this.textArea,
this.transitionModel);
}
代码示例来源:origin: org.java.net.substance/substance
/**
* Simple constructor.
*
* @param c
* Component (text area).
*/
public SubstanceTextAreaUI(JComponent c) {
super();
this.textArea = (JTextArea) c;
this.transitionModel = new DefaultButtonModel();
this.transitionModel.setArmed(false);
this.transitionModel.setSelected(false);
this.transitionModel.setPressed(false);
this.transitionModel.setRollover(false);
this.transitionModel.setEnabled(this.textArea.isEnabled());
this.stateTransitionTracker = new StateTransitionTracker(this.textArea,
this.transitionModel);
}
代码示例来源:origin: GoldenGnu/jeveassets
cancelProcessing();
} else {
if (jResult.isEnabled()) {
int value = JOptionPane.showConfirmDialog(program.getMainWindow().getFrame(), TabsRouting.get().resultOverwrite(), TabsRouting.get().calculate(), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if (value != JOptionPane.OK_OPTION) {
内容来源于网络,如有侵权,请联系作者删除!