@Override public void setViewportView(Component trackSetView) { if (!(trackSetView instanceof TrackPanel)) { throw new IllegalArgumentException("Class TrackPanelScrollPane can only contain a TrackPanel"); } super.setViewportView(trackSetView); this.trackPanel = (TrackPanel) trackSetView; }
/** * Sets the list data. * * @param objects */ protected void setListData(Vector<?> objects) { if (getList() == null) { return; } resetSelection(); getList().setListData(objects); // update the view so that isViewSizeSet flag in JViewport is reset to false if (_scroll != null) { _scroll.setViewportView(getList()); } }
/** * Sets the list data. * * @param objects */ protected void setListData(Object[] objects) { if (getList() == null) { return; } resetSelection(); getList().setListData(objects); // update the view so that isViewSizeSet flag in JViewport is reset to false if (_scroll != null) { _scroll.setViewportView(getList()); } }
/** * Creates a <code>JideScrollPane</code> that displays the view component in a viewport whose view position can be * controlled with a pair of scrollbars. The scrollbar policies specify when the scrollbars are displayed, For * example, if <code>vsbPolicy</code> is <code>VERTICAL_SCROLLBAR_AS_NEEDED</code> then the vertical scrollbar only * appears if the view doesn't fit vertically. The available policy settings are listed at {@link * #setVerticalScrollBarPolicy(int)} and {@link #setHorizontalScrollBarPolicy(int)}. * * @param view the component to display in the scrollpanes viewport * @param vsbPolicy an integer that specifies the vertical scrollbar policy * @param hsbPolicy an integer that specifies the horizontal scrollbar policy * @see #setViewportView(java.awt.Component) */ public JideScrollPane(Component view, int vsbPolicy, int hsbPolicy) { setLayout(new JideScrollPaneLayout.UIResource()); setVerticalScrollBarPolicy(vsbPolicy); setHorizontalScrollBarPolicy(hsbPolicy); setViewport(createViewport()); setVerticalScrollBar(createVerticalScrollBar()); setHorizontalScrollBar(createHorizontalScrollBar()); if (null != view) { setViewportView(view); } setOpaque(true); updateUI(); if (!getComponentOrientation().isLeftToRight()) { viewport.setViewPosition(new Point(Integer.MAX_VALUE, 0)); } }