javax.swing.JTextPane.setEnabled()方法的使用及代码示例

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

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

JTextPane.setEnabled介绍

暂无

代码示例

代码示例来源:origin: antlr/antlrworks

public void actionPerformed(ActionEvent e) {
    if (testRigDefaultRadio.isSelected()) {
      testTextArea.setEnabled(false);
    } else {
      testTextArea.setEnabled(true);
    }
  }
});

代码示例来源:origin: antlr/antlrworks

public void actionPerformed(ActionEvent e) {
    if (testRigDefaultRadio.isSelected()) {
      testTextArea.setEnabled(false);
    } else {
      testTextArea.setEnabled(true);
    }
  }
});

代码示例来源:origin: antlr/antlrworks

public void actionPerformed(ActionEvent e) {
    if (classTestRadio.isSelected()) {
      testTextArea.setEnabled(false);
      testClassField.setEnabled(true);
    } else {
      testTextArea.setEnabled(true);
      testClassField.setEnabled(false);
    }
  }
});

代码示例来源:origin: antlr/antlrworks

public void actionPerformed(ActionEvent e) {
    if (textTestRadio.isSelected()) {
      testTextArea.setEnabled(true);
      testClassField.setEnabled(false);
    } else {
      testTextArea.setEnabled(false);
      testClassField.setEnabled(true);
    }
  }
});

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-clientproject

private void setOnlineTemplateEnabled(boolean enabled) {
  onlineTemplateDescriptionLabel.setEnabled(enabled);
  onlineTemplateList.setEnabled(enabled);
  onlineTemplateDescriptionTextPane.setEnabled(enabled);
}

代码示例来源:origin: stackoverflow.com

SpringLayout layout = new SpringLayout();
JPanel contentPane = new JPanel(layout); // <-- Add the layout manager.
JTextPane txtpnHello = new JTextPane();
// The "Spring" for right
layout.putConstraint(SpringLayout.EAST, txtpnHello, 5,
    SpringLayout.EAST, contentPane);
// The "spring" for the bottom.
layout.putConstraint(SpringLayout.SOUTH, txtpnHello, 5, 
    SpringLayout.SOUTH, contentPane);
txtpnHello.setText("Hello");
txtpnHello.setEnabled(false);
contentPane.add(txtpnHello);

代码示例来源:origin: nl.cloudfarming.client/logging

public LogPanel() {
  setLayout(new BorderLayout());
  textPane.setEnabled(true); // false to disable user-input
  scrollPane.getViewport().add(textPane);
  add(scrollPane);
}

代码示例来源:origin: eu.agrosense.client/logging

public LogPanel() {
  setLayout(new BorderLayout());
  textPane.setEnabled(true); // false to disable user-input
  scrollPane.getViewport().add(textPane);
  add(scrollPane);
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void setEnabled(boolean newValue) {
  super.setEnabled(newValue);
  editor.setEnabled(newValue);
  scrollPane.setEnabled(newValue);
}

代码示例来源:origin: antlr/antlrworks

private void prepareTestRigTabValues() {
  String grammarLanguage = testRigLanguageComboBox.getSelectedItem().toString();
  testTextArea.setText(AWPrefs.getTestRigTemplateTextByLanguage(grammarLanguage));
  if ("".equals(testTextArea.getText())) {
    try {
      if ("JAVA".equalsIgnoreCase(grammarLanguage)) {
        testTextArea.setText(Utils.stringFromFile(IDE.getApplicationPath() + File.separatorChar + 
            DBLocal.parserGlueCodeTemplatePath + DBLocal.parserGlueCodeTemplateName + ".st"));
      } else if ("PYTHON".equalsIgnoreCase(grammarLanguage)) {
        testTextArea.setText(Utils.stringFromFile(IDE.getApplicationPath() + File.separatorChar +
            DBLocal.parserGlueCodeTemplatePath + DBLocal.parserGlueCodeTemplateName + "_python.st"));
      }
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
  if (AWPrefs.TEST_RIG_MODE_DEFAULT.equals(AWPrefs.getTestRigTemplateModeByLanguage(grammarLanguage))) {
    testRigDefaultRadio.setSelected(true);
    testTextArea.setEnabled(false);
  } else {
    testRigTextRadio.setSelected(true);
    testTextArea.setEnabled(true);
  }
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Constructs user input to add a DataSource.
 * 
 * @param aog
 *            AbstractONDEXGraph to add to
 * @param dataSource
 *            DataSource to use
 */
public DialogDataSource(ONDEXGraph aog, DataSource dataSource) {
  super("Dialog.DataSource.Title", "Properties16.gif");
  this.aog = aog;
  // set existing information
  id.setText(dataSource.getId());
  fullname.setText(dataSource.getFullname());
  description.setText(dataSource.getDescription());
  // set everything to disabled
  id.setEditable(false);
  fullname.setEditable(false);
  description.setEnabled(false);
  this.getContentPane().setLayout(new BorderLayout());
  this.getContentPane().add(makeProperties(), BorderLayout.CENTER);
  this.getContentPane().add(makeButtonsPanel(null, "Dialog.DataSource.Cancel"), BorderLayout.SOUTH);
  this.pack();
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Constructs user input to add a EvidenceType.
 * 
 * @param aog
 *            AbstractONDEXGraph to add to
 * @param et
 *            EvidenceType to use
 */
public DialogEvidenceType(ONDEXGraph aog, EvidenceType et) {
  super("Dialog.EvidenceType.Title", "Properties16.gif");
  this.aog = aog;
  // set existing information
  id.setText(et.getId());
  fullname.setText(et.getFullname());
  description.setText(et.getDescription());
  // set everything to disabled
  id.setEditable(false);
  fullname.setEditable(false);
  description.setEnabled(false);
  this.getContentPane().setLayout(new BorderLayout());
  this.getContentPane().add(makeProperties(), BorderLayout.CENTER);
  this.getContentPane().add(makeButtonsPanel(null, "Dialog.EvidenceType.Cancel"), BorderLayout.SOUTH);
  this.pack();
}

代码示例来源:origin: nroduit/Weasis

buf.append("\n"); //$NON-NLS-1$
textPane.setEnabled(!(graphic instanceof PixelInfoGraphic));
textPane.setText(buf.toString());
panel.setViewportView(textPane);

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Constructs user input to add a ConceptClass.
 * 
 * @param aog
 *            AbstractONDEXGraph to add to
 * @param conceptClass
 *            Concept Class to use
 */
public DialogConceptClass(ONDEXGraph aog, ConceptClass conceptClass) {
  super("Dialog.ConceptClass.Title", "Properties16.gif");
  this.aog = aog;
  initSpecialisationOf();
  // set existing information
  id.setText(conceptClass.getId());
  fullname.setText(conceptClass.getFullname());
  description.setText(conceptClass.getDescription());
  ConceptClass specialisation = conceptClass.getSpecialisationOf();
  if (specialisation != null)
    specialisationOf.setSelectedItem(specialisation.getId());
  // set everything to disabled
  id.setEditable(false);
  fullname.setEditable(false);
  description.setEnabled(false);
  specialisationOf.setEnabled(false);
  this.getContentPane().setLayout(new BorderLayout());
  this.getContentPane().add(makeProperties(), BorderLayout.CENTER);
  this.getContentPane().add(makeButtonsPanel(null, "Dialog.ConceptClass.Cancel"), BorderLayout.SOUTH);
  this.pack();
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

description.setEnabled(false);
inverse.setEnabled(false);
antisym.setEnabled(false);

代码示例来源:origin: tflobbe/solrmeter

this.textPaneExtractionDetails.setVisible(false);
this.textPaneExtractionDetails.setEditable(false);
this.textPaneExtractionDetails.setEnabled(true);

代码示例来源:origin: triplea-game/triplea

chat.addChatListener(this);
send.setEnabled(true);
text.setEnabled(true);
synchronized (chat.getMutex()) {
 text.setText("");
text.setEnabled(false);
updatePlayerList(Collections.emptyList());

代码示例来源:origin: org.protege/protege-editor-owl

textPane.setEnabled(!forceReadOnlyRendering);
textPane.setEnabled(false);

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

textPane.setEnabled(!forceReadOnlyRendering);
textPane.setEnabled(false);

代码示例来源:origin: protegeproject/protege

textPane.setEnabled(!forceReadOnlyRendering);
textPane.setEnabled(false);

相关文章

JTextPane类方法