javax.swing.JTextArea.isEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(201)

本文整理了Java中javax.swing.JTextArea.isEnabled()方法的一些代码示例,展示了JTextArea.isEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.isEnabled()方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:isEnabled

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) {

相关文章

JTextArea类方法