javax.swing.JEditorPane.setVisible()方法的使用及代码示例

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

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

JEditorPane.setVisible介绍

暂无

代码示例

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

public class HTMLTest {    

   public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
     @Override
     public void run() {
      String html = "<ul><li>Cautious</li><li>Curious</li></ul>";
      JEditorPane pane = new JEditorPane("text/html", html) {

       public void paint(Graphics g) {
        Graphics2D g2d = (Graphics2D) g.create();
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        super.paint(g2d);
        g2d.dispose();
       }

      };
      pane.setVisible(true);

      JOptionPane.showMessageDialog(null, pane);
     }
    });    
   }
}

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

protected void setVisibleStereotypes( boolean visible ){
  getStereotypeLabel().setVisible(visible);
  getStereotypesComponent().setVisible( visible );
}

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

protected void setVisibleScope( boolean visible ){
  getScopeComponent().setVisible(visible);
  getScopeLabel().setVisible( visible );
}

代码示例来源:origin: danmbox/briss2

public HelpDialog(final Frame owner, final String title,
    final Dialog.ModalityType modalityType) {
  super(owner, title, modalityType);
  setBounds(232, 232, 500, 800);
  String helpText = "";
  InputStream is = getClass().getResourceAsStream(HELP_FILE_PATH);
  byte[] buf = new byte[1024 * 100];
  try {
    int cnt = is.read(buf);
    helpText = new String(buf, 0, cnt);
  } catch (IOException e) {
    helpText = "Couldn't read the help file... Please contact gerhard.aigner@gmail.com";
  }
  JEditorPane jEditorPane = new JEditorPane("text/html", helpText);
  jEditorPane.setEditable(false);
  jEditorPane.setVisible(true);
  JScrollPane scroller = new JScrollPane(jEditorPane);
  getContentPane().add(scroller);
  setDefaultCloseOperation(DISPOSE_ON_CLOSE);
  setVisible(true);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

/**
 * {@inheritDoc}
 */
protected void reinit() {
  super.reinit();
  ErrorInfo info = pane == null ? null : pane.getErrorInfo();
  titleLabel.setText(info == null ? "Unknown Error" : info.getTitle());
  
  Object finePrint = pane.getClientProperty("fine-print");
  String text = finePrint == null ? null : finePrint.toString();
  disclaimerText.setText(text);
  disclaimerText.setVisible(text != null);
  
  if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale()));
  } else {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale()));
  }
}

代码示例来源:origin: dcaoyuan/nbscala

public void showCondition(boolean show) {
  conditionCheckBox.setVisible(show);
  if (show) {
    conditionCheckBoxActionPerformed(null);
  } else {
    spCondition.setVisible(show);
    tfCondition.setVisible(show);
    tfConditionFieldForUI.setVisible(show);
  }
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
@Override
protected void reinit() {
  super.reinit();
  ErrorInfo info = pane == null ? null : pane.getErrorInfo();
  titleLabel.setText(info == null ? "Unknown Error" : info.getTitle());
  
  Object finePrint = pane.getClientProperty("fine-print");
  String text = finePrint == null ? null : finePrint.toString();
  disclaimerText.setText(text);
  disclaimerText.setVisible(text != null);
  
  if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale()));
  } else {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale()));
  }
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * {@inheritDoc}
 */
@Override
protected void reinit() {
  super.reinit();
  ErrorInfo info = pane == null ? null : pane.getErrorInfo();
  titleLabel.setText(info == null ? "Unknown Error" : info.getTitle());
  
  Object finePrint = pane.getClientProperty("fine-print");
  String text = finePrint == null ? null : finePrint.toString();
  disclaimerText.setText(text);
  disclaimerText.setVisible(text != null);
  
  if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale()));
  } else {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale()));
  }
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
@Override
protected void reinit() {
  super.reinit();
  ErrorInfo info = pane == null ? null : pane.getErrorInfo();
  titleLabel.setText(info == null ? "Unknown Error" : info.getTitle());
  
  Object finePrint = pane.getClientProperty("fine-print");
  String text = finePrint == null ? null : finePrint.toString();
  disclaimerText.setText(text);
  disclaimerText.setVisible(text != null);
  
  if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale()));
  } else {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale()));
  }
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * {@inheritDoc}
 */
@Override
protected void reinit() {
  super.reinit();
  ErrorInfo info = pane == null ? null : pane.getErrorInfo();
  titleLabel.setText(info == null ? "Unknown Error" : info.getTitle());
  
  Object finePrint = pane.getClientProperty("fine-print");
  String text = finePrint == null ? null : finePrint.toString();
  disclaimerText.setText(text);
  disclaimerText.setVisible(text != null);
  
  if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale()));
  } else {
    closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale()));
  }
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

disclaimerText.setVisible(false);
disclaimerText.setEditable(false);
disclaimerText.setOpaque(false);

代码示例来源:origin: org.swinglabs.swingx/swingx-all

disclaimerText.setVisible(false);
disclaimerText.setEditable(false);
disclaimerText.setOpaque(false);

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

disclaimerText.setVisible(false);
disclaimerText.setEditable(false);
disclaimerText.setOpaque(false);

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

disclaimerText.setVisible(false);
disclaimerText.setEditable(false);
disclaimerText.setOpaque(false);

代码示例来源:origin: org.swinglabs.swingx/swingx-core

disclaimerText.setVisible(false);
disclaimerText.setEditable(false);
disclaimerText.setOpaque(false);

代码示例来源:origin: dcaoyuan/nbscala

tfCondition.setVisible(true);
spCondition.setVisible(true);
tfConditionFieldForUI.setVisible(false);
tfCondition.setVisible(false);
spCondition.setVisible(false);
tfConditionFieldForUI.setText(tfCondition.getText());

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp

pane.setVisible(true);
Iterable<GuardedSection> iterable = GuardedSectionManager.getInstance(document).getGuardedSections();

相关文章

JEditorPane类方法