boolean isLeftToRight = getComponentOrientation().isLeftToRight(); if (key.equals(HORIZONTAL_LEADING)) { key = isLeftToRight ? HORIZONTAL_LEFT : HORIZONTAL_RIGHT;
boolean isLeftToRight = getComponentOrientation().isLeftToRight(); if (key.equals(HORIZONTAL_LEADING)) { key = isLeftToRight ? HORIZONTAL_LEFT : HORIZONTAL_RIGHT; add(corner, key); if (corner != null) corner.setComponentOrientation(getComponentOrientation()); firePropertyChange(key, old, corner); revalidate();
/** * 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)); } }