Examples of JTextPane


Examples of javax.swing.JTextPane

    private Util() {
    }

    static JTextPane showStartupDialog(final String title, final Dimension screenSize) {
        JTextPane text = new JTextPane();
        text.setText("...");

        JDialog d = new JDialog((Window) null);
        d.setTitle(title);
        d.add(text);
        d.setSize((int) screenSize.getWidth() / 2, 30);
View Full Code Here

Examples of javax.swing.JTextPane

    return confirmed;
  }

  private JTextPane getTextPane() {
    if (textPane == null) {
      textPane = new JTextPane();
      textPane.setEditable(false);
    }
    return textPane;
  }
View Full Code Here

Examples of javax.swing.JTextPane

    }
   
    private void initComponents(String fileName) {
        super.initComponents();
       
        JTextPane textPane = new JTextPane();
        textPane.setEditable(false);
        textPane.setContentType("text/html");
        textPane.addHyperlinkListener(new HyperlinkAdapter(this));
       
        try {
            textPane.setText(readFile(fileName));
            textPane.setCaretPosition(0);
        }
        catch (IOException e) {
            e.printStackTrace();
        }
       
View Full Code Here

Examples of javax.swing.JTextPane

    panel_2.setLayout(new BorderLayout(0, 0));

    JScrollPane scrollPane = new JScrollPane();
    panel_2.add(scrollPane, BorderLayout.CENTER);

    JTextPane textPane = new JTextPane();
    textPane.addHyperlinkListener(new HyperlinkListener() {
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          try {
            java.awt.Desktop.getDesktop().browse(e.getURL().toURI());
          }
View Full Code Here

Examples of javax.swing.JTextPane

    gbl_panel.rowHeights = new int[] { 0, 0 };
    gbl_panel.columnWeights = new double[] { 1.0, 0.0, Double.MIN_VALUE };
    gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel.setLayout(gbl_panel);

    JTextPane txtpnDragModsFrom = new JTextPane();
    txtpnDragModsFrom.setForeground(Color.GRAY);
    GridBagConstraints gbc_txtpnDragModsFrom = new GridBagConstraints();
    gbc_txtpnDragModsFrom.fill = GridBagConstraints.HORIZONTAL;
    gbc_txtpnDragModsFrom.insets = new Insets(0, 0, 0, 5);
    gbc_txtpnDragModsFrom.gridx = 0;
    gbc_txtpnDragModsFrom.gridy = 0;
    panel.add(txtpnDragModsFrom, gbc_txtpnDragModsFrom);
    txtpnDragModsFrom.setFont(new Font("Dialog", Font.BOLD | Font.ITALIC,
        12));
    txtpnDragModsFrom.setBackground(Color.WHITE);
    txtpnDragModsFrom.setEditable(false);
    txtpnDragModsFrom
        .setText("Drag Mods from your file manager to the Table below and click 'Install Mods' or use File -> Add Mods from the menu to add mods");

    {
      // JLabel lblTest = new JLabel("test");
      ImagePanel img = new ImagePanel(
View Full Code Here

Examples of javax.swing.JTextPane

        return treePane;
    }

    private Component createResponseMetadataPanel()
    {
        stats = new JTextPane();
        stats.setEditable(false);
        stats.setBackground(getBackground());

        // Add styles to use for different types of status messages       
        StyledDocument doc = (StyledDocument) stats.getDocument();
View Full Code Here

Examples of javax.swing.JTextPane

  {
    super();

    // Special TextPane which catches for cut and paste, both L&F keys and
    // programmatic  behaviour
    text = new JTextPane( doc=new DefaultStyledDocument() )
    {
      public void  cut() {
        if (text.getCaretPosition() < cmdStart)  {
          super.copy();
        } else {
View Full Code Here

Examples of javax.swing.JTextPane

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        insertedComponent = new JButton();
        textPane = new JTextPane();
        document = textPane.getStyledDocument();
        document.insertString(0, "Hello\n word!!!", new SimpleAttributeSet());
        textPane.setCaretPosition(3);
        textPane.insertComponent(insertedComponent);
        componentElement = document.getDefaultRootElement().getElement(0).getElement(1);
View Full Code Here

Examples of javax.swing.JTextPane

        return treePane;
    }

    private Component createResponseMetadataPanel()
    {
        stats = new JTextPane();
        stats.setEditable(false);
        stats.setBackground(getBackground());

        // Add styles to use for different types of status messages       
        StyledDocument doc = (StyledDocument) stats.getDocument();
View Full Code Here

Examples of javax.swing.JTextPane

 
  public TextPaneAppender(Layout layout, String name) {
    this();
    this.layout = layout;
    this.name = name;
    setTextPane(new JTextPane());
    createAttributes();
    createIcons();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.