@Override public Component getCorner(String key) { if (key == null) { return null; } if (key.equals(SUB_UPPER_LEFT)) { return _subUpperLeft; } else if (key.equals(SUB_UPPER_RIGHT)) { return _subUpperRight; } return super.getCorner(key); }
@Override public Component getCorner(String key) { if (LOWER_LEFT_0_CORNER.equals(key)) { return lowerLeft0; } else if (LOWER_RIGHT_0_CORNER.equals(key)) { return lowerRight0; } else if (UPPER_RIGHT_0_CORNER.equals(key)) { return upperRight0; } else { return super.getCorner(key); } }
private void removeColumnControlFromCorners(JScrollPane scrollPane, String... corners) { for (String corner : corners) { if (scrollPane.getCorner(corner) == getColumnControl()) { scrollPane.setCorner(corner, null); } } }
/** * This method is invoked after the ScrollPaneLayout is set as the * LayoutManager of a <code>JScrollPane</code>. * It initializes all of the internal fields that * are ordinarily set by <code>addLayoutComponent</code>. For example: * <pre> * ScrollPaneLayout mySPLayout = new ScrollPanelLayout() { * public void layoutContainer(Container p) { * super.layoutContainer(p); * // do some extra work here ... * } * }; * scrollpane.setLayout(mySPLayout): * </pre> */ public void syncWithScrollPane(JScrollPane sp) { viewport = sp.getViewport(); vsb = sp.getVerticalScrollBar(); hsb = sp.getHorizontalScrollBar(); rowHead = sp.getRowHeader(); colHead = sp.getColumnHeader(); lowerLeft = sp.getCorner(LOWER_LEFT_CORNER); lowerRight = sp.getCorner(LOWER_RIGHT_CORNER); upperLeft = sp.getCorner(UPPER_LEFT_CORNER); upperRight = sp.getCorner(UPPER_RIGHT_CORNER); vsbPolicy = sp.getVerticalScrollBarPolicy(); hsbPolicy = sp.getHorizontalScrollBarPolicy(); }
private void removeColumnControlFromCorners(JScrollPane scrollPane, String... corners) { for (String corner : corners) { if (scrollPane.getCorner(corner) == getColumnControl()) { scrollPane.setCorner(corner, null); } } }
private void removeColumnControlFromCorners(JScrollPane scrollPane, String... corners) { for (String corner : corners) { if (scrollPane.getCorner(corner) == getColumnControl()) { scrollPane.setCorner(corner, null); } } }
private void removeColumnControlFromCorners(JScrollPane scrollPane, String... corners) { for (String corner : corners) { if (scrollPane.getCorner(corner) == getColumnControl()) { scrollPane.setCorner(corner, null); } } }
/** * This method is invoked after the ScrollPaneLayout is set as the * LayoutManager of a <code>JScrollPane</code>. * It initializes all of the internal fields that * are ordinarily set by <code>addLayoutComponent</code>. For example: * <pre> * ScrollPaneLayout mySPLayout = new ScrollPanelLayout() { * public void layoutContainer(Container p) { * super.layoutContainer(p); * // do some extra work here ... * } * }; * scrollpane.setLayout(mySPLayout): * </pre> */ public void syncWithScrollPane(JScrollPane sp) { viewport = sp.getViewport(); vsb = sp.getVerticalScrollBar(); hsb = sp.getHorizontalScrollBar(); rowHead = sp.getRowHeader(); colHead = sp.getColumnHeader(); lowerLeft = sp.getCorner(LOWER_LEFT_CORNER); lowerRight = sp.getCorner(LOWER_RIGHT_CORNER); upperLeft = sp.getCorner(UPPER_LEFT_CORNER); upperRight = sp.getCorner(UPPER_RIGHT_CORNER); vsbPolicy = sp.getVerticalScrollBarPolicy(); hsbPolicy = sp.getHorizontalScrollBarPolicy(); }
@Override protected void uninstallDefaults(JScrollPane c) { Component upperRight = c.getCorner(JScrollPane.UPPER_RIGHT_CORNER); if (upperRight instanceof UIResource) { c.setCorner(JScrollPane.UPPER_RIGHT_CORNER, null); } Component upperLeft = c.getCorner(JScrollPane.UPPER_LEFT_CORNER); if (upperLeft instanceof UIResource) { c.setCorner(JScrollPane.UPPER_LEFT_CORNER, null); } LayoutManager lm = scrollpane.getLayout(); if (lm instanceof AdjustedLayout) { c.setLayout(((AdjustedLayout) lm).delegate); } super.uninstallDefaults(c); }
@Override protected void uninstallDefaults(JScrollPane c) { Component upperRight = c.getCorner(JScrollPane.UPPER_RIGHT_CORNER); if (upperRight instanceof UIResource) { c.setCorner(JScrollPane.UPPER_RIGHT_CORNER, null); } Component upperLeft = c.getCorner(JScrollPane.UPPER_LEFT_CORNER); if (upperLeft instanceof UIResource) { c.setCorner(JScrollPane.UPPER_LEFT_CORNER, null); } LayoutManager lm = scrollpane.getLayout(); if (lm instanceof AdjustedLayout) { c.setLayout(((AdjustedLayout) lm).delegate); } super.uninstallDefaults(c); }
@Override public void syncWithScrollPane(JScrollPane sp) { super.syncWithScrollPane(sp); if (sp instanceof JideScrollPane) { _rowFoot = ((JideScrollPane) sp).getRowFooter(); _colFoot = ((JideScrollPane) sp).getColumnFooter(); _subColHead = ((JideScrollPane) sp).getSubColumnHeader(); _hLeft = ((JideScrollPane) sp).getScrollBarCorner(HORIZONTAL_LEFT); _hRight = ((JideScrollPane) sp).getScrollBarCorner(HORIZONTAL_RIGHT); _vTop = ((JideScrollPane) sp).getScrollBarCorner(VERTICAL_TOP); _vBottom = ((JideScrollPane) sp).getScrollBarCorner(VERTICAL_BOTTOM); _subUpperLeft = sp.getCorner(SUB_UPPER_LEFT); _subUpperRight = sp.getCorner(SUB_UPPER_RIGHT); } }
b.add(scroll); scroll.getViewport().setOpaque(false); Component corner = scroll.getCorner(JScrollPane.LOWER_RIGHT_CORNER); if (corner != null) {
tableScroll.setBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0)); tableScroll.setCorner(JScrollPane.UPPER_RIGHT_CORNER, new JPanel()); tableScroll.getCorner(JScrollPane.UPPER_RIGHT_CORNER).setBackground(Color.WHITE); viewPort = new CustomTimeLineViewport(this); viewPort.setView(table);
String cornerKey = scrollpane.getComponentOrientation().isLeftToRight() ? JScrollPane.UPPER_RIGHT_CORNER : JScrollPane.UPPER_LEFT_CORNER; Component cornerComp = scrollpane.getCorner(cornerKey);
String cornerKey = scrollpane.getComponentOrientation().isLeftToRight() ? JScrollPane.UPPER_RIGHT_CORNER : JScrollPane.UPPER_LEFT_CORNER; Component cornerComp = scrollpane.getCorner(cornerKey);