Package javax.swing

Examples of javax.swing.JScrollPane


      if (m_outText == null) {
  setUpResultHistory();
      }
      m_resultsFrame = new JFrame("Text Viewer");
      m_resultsFrame.getContentPane().setLayout(new BorderLayout());
      final JScrollPane js = new JScrollPane(m_outText);
      js.setBorder(BorderFactory.createTitledBorder("Text"));
      m_resultsFrame.getContentPane().add(js, BorderLayout.CENTER);
      m_resultsFrame.getContentPane().add(m_history, BorderLayout.WEST);
      m_resultsFrame.addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent e) {
      m_resultsFrame.dispose();
View Full Code Here


    m_table.getColumnModel().getColumn(3).setPreferredWidth(400);
    m_table.setShowVerticalLines(true);
   
    JPanel statusPan = new JPanel();
    statusPan.setLayout(new BorderLayout());
    statusPan.add(new JScrollPane(m_table), BorderLayout.CENTER);
    m_tabs.addTab("Status", statusPan);
    m_tabs.addTab("Log", m_logPanel);
   
    setLayout(new BorderLayout());
    add(m_tabs, BorderLayout.CENTER);
View Full Code Here

    JPanel optionsHolder = new JPanel();
    optionsHolder.setLayout(new BorderLayout());
    optionsHolder.setBorder(BorderFactory.createTitledBorder("Other options"));

    optionsHolder.add(m_LoaderEditor, BorderLayout.SOUTH);
    JScrollPane scroller = new JScrollPane(optionsHolder);
   
    add(scroller, BorderLayout.CENTER);
   
    add(butHolder, BorderLayout.SOUTH);
  }
View Full Code Here

    buttons.add(ssButs);
   
    JPanel p3 = new JPanel();
    p3.setBorder(BorderFactory.createTitledBorder("Classifier output"));
    p3.setLayout(new BorderLayout());
    final JScrollPane js = new JScrollPane(m_OutText);
    p3.add(js, BorderLayout.CENTER);
    js.getViewport().addChangeListener(new ChangeListener() {
      private int lastHeight;
      public void stateChanged(ChangeEvent e) {
  JViewport vp = (JViewport)e.getSource();
  int h = vp.getViewSize().height;
  if (h != lastHeight) { // i.e. an addition not just a user scrolling
View Full Code Here

          }
        }
      }
    });

    final JScrollPane scrollPane = new JScrollPane(infoPanel);
    panel.add(scrollPane, cc.xyw(1,1,2));

    JButton ok = new JButton(Localizer.getLocalization(Localizer.I18N_OK));

    ok.addActionListener(new ActionListener() {
View Full Code Here

                            xTextOffset, yHeaderTextOffset + y * hourWidth);
                }
            }
        };

        scroll = new JScrollPane();
        scroll.setRowHeaderView(rowHeader);

//        scroll.setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, new JLabel() {
//
//            @Override
//            public String getText() {
//                return "no:" + getCurrentIntervals().size();
//            }
//        });

        scroll.setColumnHeaderView(columnHeader);

        JPanel timeNorthPanel = new JPanel();
        calendarDateField = CalendarFactory.createDateField();
        calendarDateField.addChangeListener(new ChangeListener() {

            @Override
            public void stateChanged(ChangeEvent e) {
                // get the date only - not the time
                DateTime val = new DateTime(((Date) calendarDateField.getValue()).getTime());
                DateTime start = settings.getStartDate();
                setStartDate(start.withYear(val.getYear()).
                        withMonthOfYear(val.getMonthOfYear()).withDayOfMonth(val.getDayOfMonth()));
            }
        });
        timeNorthPanel.add(calendarDateField);
        timeNorthPanel.add(prevDaysButton = new SmallButton("<"));
        timeNorthPanel.add(nextDaysButton = new SmallButton(">"));
        prevDaysButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                setStartDate(settings.getStartDate().minusDays(settings.getNumberOfDays()));
            }
        });
        nextDaysButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                setStartDate(settings.getStartDate().plusDays(settings.getNumberOfDays()));
            }
        });

        scroll.setViewportView(timetableGrid);

        JPanel southPanel = new JPanel(new GridLayout(1, 0));
        eventJList.setVisibleRowCount(3);
        taskJList.setVisibleRowCount(3);
        southPanel.add(new JScrollPane(eventJList));
        southPanel.add(new JScrollPane(taskJList));

        listener = new PropertyChangeListener() {

            @Override
            public void propertyChange(PropertyChangeEvent evt) {
View Full Code Here

    this.preferences = preferences;
    createActions(controller, preferences);
   
    // Layout components
    JComponent furnitureLibraryView = (JComponent)controller.getFurnitureLibraryController().getView();
    JScrollPane furnitureLibraryScrollPane = new JScrollPane(furnitureLibraryView);
    JViewport viewport = furnitureLibraryScrollPane.getViewport();
    viewport.setTransferHandler(furnitureLibraryView.getTransferHandler());   
    JPopupMenu furnitureLibraryPopupMenu = createFurnitureLibraryPopupMenu(preferences, controller);
    furnitureLibraryView.setComponentPopupMenu(furnitureLibraryPopupMenu);
    viewport.setComponentPopupMenu(furnitureLibraryPopupMenu);
    getContentPane().add(furnitureLibraryScrollPane);
View Full Code Here

    public JComponent createNorthPanel() {
        return super.createButtonBar();
    }

    public JComponent createMasterComponent() {
        return new JScrollPane(getMasterTable());
    }
View Full Code Here

        JTable table = new JTable(sorter);             //NEW
        sorter.addMouseListenerToHeaderInTable(table); //ADDED THIS
        table.setPreferredScrollableViewportSize(new Dimension(500, 70));

        //Create the scroll pane and add the table to it.
        JScrollPane scrollPane = new JScrollPane(table);

        //Add the scroll pane to this window.
        getContentPane().add(scrollPane, BorderLayout.CENTER);

        addWindowListener(new WindowAdapter() {
View Full Code Here

    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

TOP

Related Classes of javax.swing.JScrollPane

Copyright © 2015 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.