public void setScrollLeftButton(AbstractButton scrollLeftButton) { AbstractButton old = getScrollLeftButton(); _scrollLeftButton = scrollLeftButton; add(_scrollLeftButton, SCROLL_LEFT_BUTTON); firePropertyChange("scrollLeftButton", old, _scrollLeftButton); revalidate(); repaint(); }
@Override public void setWheelScrollingEnabled(boolean handleWheel) { if (handleWheel && !isWheelScrollingEnabled()) this.addMouseWheelListener(this); if (!handleWheel && isWheelScrollingEnabled()) this.removeMouseWheelListener(this); super.setWheelScrollingEnabled(handleWheel); } }
public void setScrollDownButton(AbstractButton scrollDownButton) { AbstractButton old = getScrollDownButton(); _scrollDownButton = scrollDownButton; add(_scrollDownButton, SCROLL_DOWN_BUTTON); firePropertyChange("scrollDownButton", old, _scrollDownButton); revalidate(); repaint(); }
public void setScrollRightButton(AbstractButton scrollRightButton) { AbstractButton old = getScrollRightButton(); _scrollRightButton = scrollRightButton; add(_scrollRightButton, SCROLL_RIGHT_BUTTON); firePropertyChange("scrollRightButton", old, _scrollRightButton); revalidate(); repaint(); }
setLayout(new SimpleScrollPaneLayout.UIResource()); setVerticalScrollBarPolicy(vsbPolicy); setHorizontalScrollBarPolicy(hsbPolicy); setViewport(createViewport()); setScrollUpButton(createScrollButton(SwingConstants.NORTH)); setScrollDownButton(createScrollButton(SwingConstants.SOUTH)); setScrollLeftButton(createScrollButton(SwingConstants.WEST)); setScrollRightButton(createScrollButton(SwingConstants.EAST)); if (null != view) { setViewportView(view); updateButtonState(); setOpaque(true); setFocusable(false); if (getHorizontalScrollBar() != null) { getHorizontalScrollBar().setVisible(false); getHorizontalScrollBar().setFocusable(false); if (getVerticalScrollBar() != null) { getVerticalScrollBar().setVisible(false); getVerticalScrollBar().setFocusable(false); updateUI(); if (!getComponentOrientation().isLeftToRight()) { viewport.setViewPosition(new Point(Integer.MAX_VALUE, 0)); if (this.isWheelScrollingEnabled()) this.addMouseWheelListener(this);
public void setScrollUpButton(AbstractButton scrollUpButton) { AbstractButton old = getScrollUpButton(); _scrollUpButton = scrollUpButton; add(_scrollUpButton, SCROLL_UP_BUTTON); firePropertyChange("scrollUpButton", old, _scrollUpButton); revalidate(); repaint(); }
final SimpleScrollPane contents = new SimpleScrollPane(popupMenu, SimpleScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, SimpleScrollPane.HORIZONTAL_SCROLLBAR_NEVER); if (popupMenu instanceof JidePopupMenu && popupMenu.getPreferredSize().height != ((JidePopupMenu) popupMenu).getPreferredScrollableViewportSize().height) { if (popupMenu.getLayout() instanceof DefaultMenuLayout && SystemInfo.isJdk6Above()) { contents.getScrollUpButton().setOpaque(true); contents.getScrollDownButton().setOpaque(true); contents.setBorder(BorderFactory.createEmptyBorder()); Component[] components = popupMenu.getComponents(); for (Component component : components) {
GridBagUtils.addToPanel(extendedOptionsPanel, new JSeparator(), extendedOptionsPanelConstraints, "insets.left=4,insets.right=2,gridy=5,anchor=SOUTHWEST"); final SimpleScrollPane optionsScrollPane = new SimpleScrollPane(extendedOptionsPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); optionsScrollPane.setBorder(null); optionsScrollPane.getVerticalScrollBar().setUnitIncrement(20);
final SimpleScrollPane simpleScrollPane = new SimpleScrollPane(filterPanel, JideScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JideScrollPane.HORIZONTAL_SCROLLBAR_NEVER); simpleScrollPane.setBorder(BorderFactory.createEmptyBorder()); centerRightPane.add(simpleScrollPane, BorderLayout.CENTER); centerRightPane.add(downloadButtonPanel, BorderLayout.SOUTH);
GridBagUtils.addToPanel(extendedOptionsPanel, new JSeparator(), extendedOptionsPanelConstraints, "insets.left=4,insets.right=2,gridy=5,anchor=SOUTHWEST"); final JScrollPane optionsScrollPane = new SimpleScrollPane(extendedOptionsPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);