Package javax.swing

Examples of javax.swing.JTextArea


    mCorrectionCB = new JComboBox(new String[] { "-1:00", "-0:45", "-0:30", "-0:15", "0:00", "+0:15", "+0:30", "+0:45", "+1:00" });
    mCorrectionCB.setSelectedIndex(mChannel[0].getTimeZoneCorrectionMinutes() / 15 + 4);

    panel.add(mCorrectionCB, cc.xy(3, 1));

    JTextArea txt = UiUtilities.createHelpTextArea(mLocalizer.msg("DLSTNote", ""));
    // Hack because of growing JTextArea in FormLayout
    txt.setMinimumSize(new Dimension(200, 20));
    panel.add(txt, cc.xyw(1, 3, 3));

    ButtonBarBuilder2 builder = new ButtonBarBuilder2();
   
    JButton defaultButton = new JButton(Localizer.getLocalization(Localizer.I18N_DEFAULT));
View Full Code Here


         *
         * @return control
         */
        protected JComponent createApplicationDescriptorComponent() {
            // Build the application descriptor data, if available
            JTextArea txtDescriptor = getComponentFactory().createTextAreaAsLabel();
            txtDescriptor.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 0));
            ApplicationDescriptor appDesc = Application.instance().getDescriptor();
            if( appDesc != null ) {
                String displayName = appDesc.getDisplayName();
                String caption = appDesc.getCaption();
                String description = appDesc.getDescription();
                String version = appDesc.getVersion();
                String buildId = appDesc.getBuildId();
                StringBuffer sb = new StringBuffer();

                if( StringUtils.hasText(displayName) ) {
                    sb.append(displayName).append("\n");
                }
                if( StringUtils.hasText(caption) ) {
                    sb.append(caption).append("\n\n");
                }
                if( StringUtils.hasText(description) ) {
                    sb.append(description).append("\n\n");
                }
                if( StringUtils.hasText(version) ) {
                    sb.append(getMessage("aboutBox.version.label")).append(": ").append(version).append("\n");
                }
                if( StringUtils.hasText(buildId) ) {
                    sb.append(getMessage("aboutBox.buildId.label")).append(": ").append(buildId).append("\n");
                }
                txtDescriptor.setText(sb.toString());
            }
            return txtDescriptor;
        }
View Full Code Here

      }

      lnr.close();
      final javax.swing.JFrame jf = new javax.swing.JFrame();
      jf.getContentPane().setLayout(new java.awt.BorderLayout());
      final JTextArea ta = new JTextArea(helpHolder.toString());
      ta.setFont(new Font("Monospaced", Font.PLAIN, 12));
      ta.setEditable(false);
      final JScrollPane sp = new JScrollPane(ta);
      jf.getContentPane().add(sp, java.awt.BorderLayout.CENTER);
      jf.addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent e) {
          tempB.setEnabled(true);
View Full Code Here

          pos = description.indexOf('\n', pos + 1)) {
        lines++;
      }
      lines = Math.max(4, Math.min(lines, 7));

      JTextArea textArea = new JTextArea(lines, 60);
      textArea.setEditable(false);
      textArea.setText(description);
      textArea.setCaretPosition(0);
     
      JScrollPane scrollPane = new JScrollPane(textArea);   
      scrollPane.setPreferredSize(new Dimension(350, 150));
      JOptionPane.showMessageDialog(parent, scrollPane,
          Strings.get("fileErrorTitle"), JOptionPane.ERROR_MESSAGE);
View Full Code Here

     * Create a Text Area for the Description
     * @param text Text to show
     * @return filled Textarea
     */
    private JTextArea createTextArea(String text) {
        JTextArea chArea =new JTextArea(3,40);
        chArea.setFont(new JLabel().getFont());
        chArea.setLineWrap(true);
        chArea.setWrapStyleWord(true);
        chArea.setEditable(false);
        chArea.setOpaque(false);
        chArea.setText(text);
        return chArea;
    }
View Full Code Here

    /* group list pane */

    EnhancedPanelBuilder groupListPanel = new EnhancedPanelBuilder("5dlu,0dlu:grow");
    groupListPanel.setDefaultDialogBorder();

    JTextArea ta = UiUtilities.createHelpTextArea(mLocalizer.msg("channelgroup.description","description"));

    groupListPanel.addRow();
    groupListPanel.add(ta, cc.xyw(1,groupListPanel.getRow(),2));

    JPanel panel2 = new JPanel(new BorderLayout(10, 0));
View Full Code Here

   * @param msg
   *          The help text.
   * @return A text area containing the help text.
   */
  public static JTextArea createHelpTextArea(String msg) {
    JTextArea descTA = new JTextArea(msg);
    descTA.setBorder(BorderFactory.createEmptyBorder());
    descTA.setFont(new JLabel().getFont());
    descTA.setEditable(false);
    descTA.setOpaque(false);
    descTA.setWrapStyleWord(true);
    descTA.setLineWrap(true);
    descTA.setFocusable(false);

    Color bg = new JPanel().getBackground();

    descTA.setBackground(new Color(bg.getRed(),bg.getGreen(),bg.getBlue()));

    return descTA;
  }
View Full Code Here

    CellConstraints cc = new CellConstraints();

    Localizer localizer = Localizer.getLocalizerFor(CopyWaitingDlg.class);
   
    String msg = localizer.msg("waitingHeader", "Importing TV data (this can take some minutes).");
    JTextArea header = new JTextArea();
    header.setPreferredSize(new Dimension(370,40));
   
    if(messageType == IMPORT_MSG) {
      msg = localizer.msg("waitingHeaderCopy", "Copying TV data (this can take some minutes).");
    }
    else if(messageType == APPDATA_MSG) {
      msg = localizer.msg("appdataHeaderMsg", "Copying TV data (this can need some minutes).\nThe data and the settings are copied to the\n" +
          "Windows appdata directory. You can delete the old TV-Browser settings directory\n if you don't use an old version of TV-Browser.");
      header.setPreferredSize(new Dimension(370,90));
    }
    else if(messageType == EXPORT_SETTINGS_MSG) {
      msg = localizer.msg("exportHeader","Copying TV data (this can need some minutes).\nThe data and the settings are copied to the\n"+
          "system settings directory.");
      header.setPreferredSize(new Dimension(370,60));
    }
    else {
      msg = localizer.msg("waitingSettingsHeader","Importing the settings of a previous version (this may take some minutes).");
    }
   
    header.setText(msg);
    header.setEditable(false);
    header.setLineWrap(true);
    header.setWrapStyleWord(true);
    header.setBorder(null);
    header.setOpaque(false);
   
    JLabel label = new JLabel(localizer.msg("pleaseWait", "Please wait until the files were copied."));
   
    header.setFont(label.getFont());
    header.setFont(header.getFont().deriveFont(Font.BOLD,(float)13));
   
    label.setFont(header.getFont());

    panel.add(header, cc.xy(2, 2));
   
    panel.add((label), cc.xy(2, 4));
View Full Code Here

        c.gridy = 2;
        c.anchor = GridBagConstraints.WEST;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(commentLabel, c);
        String comment = (String) workItem.getParameter("Comment");
        JTextArea params = new JTextArea(
            comment == null ? "" : comment);
        params.setEditable(false);
        c = new GridBagConstraints();
        c.gridy = 2;
        c.weightx = 1;
        c.weighty = 1;
        c.fill = GridBagConstraints.BOTH;
View Full Code Here

        JPanel panel = new JPanel();
        panel.setLayout(new GridBagLayout());
        getRootPane().setLayout(new BorderLayout());
        getRootPane().add(panel, BorderLayout.CENTER);
       
        JTextArea params = new JTextArea();
        params.setText(getParameters());
        params.setEditable(false);
        GridBagConstraints c = new GridBagConstraints();
        c.weightx = 1;
        c.weighty = 1;
        c.gridwidth = 5;
        c.fill = GridBagConstraints.BOTH;
View Full Code Here

TOP

Related Classes of javax.swing.JTextArea

Copyright © 2018 www.massapicom. 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.