Examples of JScrollPane


Examples of javax.swing.JScrollPane

    public MainKFPerspective() {
      setLayout(new BorderLayout());
      setUpToolsAndJTree();

      JScrollPane treeView = new JScrollPane(m_componentTree);
      JPanel treeHolder = new JPanel();
      treeHolder.setLayout(new BorderLayout());
      treeHolder.setBorder(BorderFactory.createTitledBorder("Design"));
      treeHolder.add(treeView, BorderLayout.CENTER);

      //m_perspectiveHolder.add(treeHolder, BorderLayout.WEST);


      JSplitPane p2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treeHolder, m_flowTabs);
      p2.setOneTouchExpandable(true);

      add(p2, BorderLayout.CENTER);

      Dimension d = treeView.getPreferredSize();
      d = new Dimension((int)(d.getWidth() * 1.5), (int)d.getHeight());
      treeView.setPreferredSize(d);
      treeView.setMinimumSize(d);

      m_flowTabs.addChangeListener(new ChangeListener() {
        // This method is called whenever the selected tab changes
        public void stateChanged(ChangeEvent evt) {

View Full Code Here

Examples of javax.swing.JScrollPane

                             createTitledBorder("Knowledge Flow Layout"),
                    javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5)
                    )); */
      BeanLayout tabBeanLayout = new BeanLayout();

      final JScrollPane js = new JScrollPane(tabBeanLayout);
      p1.add(js, BorderLayout.CENTER);
      js.getVerticalScrollBar().setUnitIncrement(m_ScrollBarIncrementLayout);
      js.getHorizontalScrollBar().setUnitIncrement(m_ScrollBarIncrementLayout);


      configureBeanLayout(tabBeanLayout);
      m_beanLayouts.add(tabBeanLayout);

View Full Code Here

Examples of javax.swing.JScrollPane

      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);
          jf.dispose();
View Full Code Here

Examples of javax.swing.JScrollPane

      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);
    } else {
      JOptionPane.showMessageDialog(parent, description,
          Strings.get("fileErrorTitle"), JOptionPane.ERROR_MESSAGE);
View Full Code Here

Examples of javax.swing.JScrollPane

    open.addActionListener(myListener);
    save.addActionListener(myListener);
    close.addActionListener(myListener);
   
    Dimension pref = editor.getPreferredSize();
    JScrollPane scroll = new JScrollPane(editor,
        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
        JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    pref.height = Math.min(pref.height, pref.width * 3 / 2);
    scroll.setPreferredSize(pref);
    scroll.getViewport().setBackground(editor.getBackground());

    Container contents = getContentPane();
    contents.add(scroll, BorderLayout.CENTER);
    contents.add(buttonPanel, BorderLayout.SOUTH);

View Full Code Here

Examples of javax.swing.JScrollPane

      gbc.anchor = GridBagConstraints.NORTHWEST;
      gbc.insets = new Insets(5, 0, 5, 0);
      gbc.fill = GridBagConstraints.NONE;
      addGb(new JLabel(Strings.get("labelCircuits") + " "));
      gbc.fill = GridBagConstraints.HORIZONTAL;
      addGb(new JScrollPane(list));
      gbc.fill = GridBagConstraints.NONE;
     
      gbc.gridy++;
      addGb(new JLabel(Strings.get("labelHeader") + " "));
      addGb(header);
View Full Code Here

Examples of javax.swing.JScrollPane

    Toolbar toolbar = new Toolbar(toolbarModel);
    add(toolbar, BorderLayout.NORTH);
   
    toolbox = new ProjectExplorer(proj);
    toolbox.setListener(new ToolboxManip(proj, toolbox));
    add(new JScrollPane(toolbox), BorderLayout.CENTER);
  }
View Full Code Here

Examples of javax.swing.JScrollPane

    JPanel selectorPanel = selector.createPanel();
    gb.setConstraints(selectorPanel, gc); add(selectorPanel);
    gb.setConstraints(prettyView, gc); add(prettyView);
      Insets oldInsets = gc.insets;
      gc.insets = new Insets(10, 10, 0, 10);
      JScrollPane fieldPane = new JScrollPane(field,
          ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
          ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    gb.setConstraints(fieldPane, gc); add(fieldPane);
      gc.insets = oldInsets;
      gc.fill = GridBagConstraints.NONE;
View Full Code Here

Examples of javax.swing.JScrollPane

      gbc.anchor = GridBagConstraints.NORTHWEST;
      gbc.insets = new Insets(5, 0, 5, 0);
      gbc.fill = GridBagConstraints.NONE;
      addGb(new JLabel(Strings.get("labelCircuits") + " "));
      gbc.fill = GridBagConstraints.HORIZONTAL;
      addGb(new JScrollPane(list));
      gbc.fill = GridBagConstraints.NONE;
     
      gbc.gridy++;
      addGb(new JLabel(Strings.get("labelImageFormat") + " "));
      Box formatsPanel = new Box(BoxLayout.Y_AXIS);
View Full Code Here

Examples of javax.swing.JScrollPane

    setJMenuBar(menubar);
    editListener.register(menubar);
  }
 
  private void addTab(int index, final JComponent comp) {
    final JScrollPane pane = new JScrollPane(comp,
        ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    if (comp instanceof TableTab) {
      pane.setVerticalScrollBar(((TableTab) comp).getVerticalScrollBar());
    }
    pane.addComponentListener(new ComponentListener() {
      public void componentResized(ComponentEvent event) {
        int width = pane.getViewport().getWidth();
        comp.setSize(new Dimension(width, comp.getHeight()));
      }

      public void componentMoved(ComponentEvent arg0) { }
      public void componentShown(ComponentEvent arg0) { }
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.