Package javax.swing

Examples of javax.swing.JScrollPane.addComponentListener()


        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()));
      }
View Full Code Here


      toolBar.add(new PaletteButton(data, context));
    }

    final JScrollPane paletteScrollpane = new JScrollPane(toolBar);
    paletteScrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    paletteScrollpane.addComponentListener(new ScrollbarSyncHandler(paletteScrollpane.getVerticalScrollBar(), toolBar));
    return paletteScrollpane;
  }

  private void rebuildReportMenu()
  {
View Full Code Here

      toolBar.add(new PaletteButton(data, context));
    }

    final JScrollPane paletteScrollpane = new JScrollPane(toolBar);
    paletteScrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    paletteScrollpane.addComponentListener(new ScrollbarSyncHandler(paletteScrollpane.getVerticalScrollBar(), toolBar));
    return paletteScrollpane;
  }

  private void rebuildReportMenu()
  {
View Full Code Here

                ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
                ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        if (comp instanceof TableTab) {
            pane.setVerticalScrollBar(((TableTab) comp).getVerticalScrollBar());
        }
        pane.addComponentListener(new ComponentListener() {
            @Override
            public void componentResized(ComponentEvent event) {
                int width = pane.getViewport().getWidth();
                comp.setSize(new Dimension(width, comp.getHeight()));
            }
View Full Code Here

    table.setAutoCreateRowSorter(true);
    table.addMouseListener(this);
    table.addKeyListener(this);
   
    JScrollPane scrollPane = new JScrollPane(table);
        scrollPane.addComponentListener(new
                CorrectStrangeBehaviourListener(table, scrollPane));

        //Add the scroll pane to this panel.
      this.setLayout(new BorderLayout());
        add(scrollPane);
View Full Code Here

        table = new JTable(new dbcTableModel(cUplink));
        //table.setPreferredScrollableViewportSize(new Dimension(70, 70));

        //Create the scroll pane and add the table to it.
        JScrollPane scrollPane = new JScrollPane(table);
        scrollPane.addComponentListener(new
                CorrectStrangeBehaviourListener(table, scrollPane));
       
        //Add the scroll pane to this panel.
        add(scrollPane);
       
View Full Code Here

          //column.setCellRenderer(new wdtTableCellRenderer());
          column.setMaxWidth(20);
        }
     
      JScrollPane scrollPane = new JScrollPane(table);
          scrollPane.addComponentListener(new
                  CorrectStrangeBehaviourListener(table, scrollPane));

          main.add(scrollPane);
    }
    return main;
View Full Code Here

      table = new JTable(new dbcRichModel(cUplink));
        table.setPreferredScrollableViewportSize(new Dimension(100, 70));

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

        //Add the scroll pane to this panel.
        add(scrollPane);
        update();
View Full Code Here

        table = new JTable(new dbcStringTableModel(cUplink));
        table.setPreferredScrollableViewportSize(new Dimension(500, 70));

        //Create the scroll pane and add the table to it.
        JScrollPane scrollPane = new JScrollPane(table);
        scrollPane.addComponentListener(new
                CorrectStrangeBehaviourListener(table, scrollPane));
       
        //Add the scroll pane to this panel.
        add(scrollPane);
       
View Full Code Here

          sourceGraph.getGraphLayoutCache()
              .addGraphLayoutCacheListener(this);
          sourceGraph.addPropertyChangeListener(this);
          JScrollPane currentScrollPane = getParentScrollPane(sourceGraph);
          if (currentScrollPane != null) {
            currentScrollPane
                .addComponentListener(componentListener);
            currentScrollPane.getVerticalScrollBar()
                .addAdjustmentListener(this);
            currentScrollPane.getHorizontalScrollBar()
                .addAdjustmentListener(this);
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.