Exemple #1
0
 @Override
 Insets getNativeInsets() {
   Insets insets = getInsets();
   insets.bottom += hAdjustable.getBounds().height;
   insets.right += vAdjustable.getBounds().width;
   return insets;
 }
Exemple #2
0
 private void updateIncrements() {
   Dimension itemSize = getItemSize();
   Dimension clientSize = getClient().getSize();
   vAdjustable.setUnitIncrement(itemSize.height);
   vAdjustable.setBlockIncrement(clientSize.height);
   Graphics gr = getGraphics();
   hAdjustable.setUnitIncrement(getMaxCharSize(gr).width);
   hAdjustable.setBlockIncrement(clientSize.width);
   gr.dispose();
 }
Exemple #3
0
 public List(int rows, boolean multipleMode) throws HeadlessException {
   toolkit.lockAWT();
   try {
     Toolkit.checkHeadless();
     this.rows = ((rows != 0) ? rows : 4);
     this.multipleMode = multipleMode;
     scrollLocation = new Point();
     hAdjustable = new ScrollPaneAdjustable(this, Adjustable.HORIZONTAL);
     vAdjustable = new ScrollPaneAdjustable(this, Adjustable.VERTICAL);
     scrollable = new ListScrollable();
     stateController = new ListStateController(scrollable);
     state = new State();
     addAWTMouseListener(stateController);
     addAWTMouseMotionListener(stateController);
     addAWTKeyListener(stateController);
     addAWTFocusListener(stateController);
     addAWTComponentListener(stateController);
     addAWTMouseWheelListener(stateController);
     hAdjustable.addAdjustmentListener(stateController);
     vAdjustable.addAdjustmentListener(stateController);
   } finally {
     toolkit.unlockAWT();
   }
 }
Exemple #4
0
 public void setAdjustableBounds(Adjustable adj, Rectangle r) {
   ((ScrollPaneAdjustable) adj).setBounds(r);
 }
Exemple #5
0
 public void setAdjustableSizes(Adjustable adj, int vis, int min, int max) {
   ((ScrollPaneAdjustable) adj).setSizes(vis, min, max);
 }
Exemple #6
0
 @Override
 void prepaint(Graphics g) {
   toolkit.theme.drawList(g, state, false);
   vAdjustable.prepaint(g);
   hAdjustable.prepaint(g);
 }