本文整理了Java中javax.swing.JEditorPane.isEnabled()
方法的一些代码示例,展示了JEditorPane.isEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.isEnabled()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名: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 = editorPane.getCaretPosition();
editorPane.updateUI();
editorPane.setCaretPosition(caretPos);
Container parent = editorPane.getParent();
if (parent != null) {
parent.invalidate();
parent.validate();
}
}
});
}
if ("enabled".equals(evt.getPropertyName())) {
transitionModel.setEnabled(editorPane.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 = editorPane.getCaretPosition();
editorPane.updateUI();
editorPane.setCaretPosition(caretPos);
Container parent = editorPane.getParent();
if (parent != null) {
parent.invalidate();
parent.validate();
}
}
});
}
if ("enabled".equals(evt.getPropertyName())) {
transitionModel.setEnabled(editorPane.isEnabled());
}
}
};
代码示例来源:origin: GoldenGnu/jeveassets
@Override
public void hyperlinkUpdate(final HyperlinkEvent hle) {
Object o = hle.getSource();
if (o instanceof JEditorPane) {
JEditorPane jEditorPane = (JEditorPane) o;
if (HyperlinkEvent.EventType.ACTIVATED.equals(hle.getEventType()) && jEditorPane.isEnabled()) {
browse(hle.getURL().toString(), window);
}
}
}
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Simple constructor.
*
* @param c
* Component (editor pane).
*/
public SubstanceEditorPaneUI(JComponent c) {
super();
this.editorPane = (JEditorPane) 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.editorPane.isEnabled());
this.stateTransitionTracker = new StateTransitionTracker(
this.editorPane, this.transitionModel);
}
代码示例来源:origin: org.java.net.substance/substance
/**
* Simple constructor.
*
* @param c
* Component (editor pane).
*/
public SubstanceEditorPaneUI(JComponent c) {
super();
this.editorPane = (JEditorPane) 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.editorPane.isEnabled());
this.stateTransitionTracker = new StateTransitionTracker(
this.editorPane, this.transitionModel);
}
内容来源于网络,如有侵权,请联系作者删除!