Examples of scrollRectToVisible()


Examples of javax.swing.JViewport.scrollRectToVisible()

                        dragInitialPoint.x - component.getX() - x,
                        dragInitialPoint.y - component.getY() - y
                ));

                // Make sure we stay in the bounds of the MapView.
                viewport.scrollRectToVisible(component.getBounds());
            }
        }
    }
}
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

            return;
        JViewport viewport = (JViewport)table.getParent();
        java.awt.Rectangle rect = table.getCellRect(pRow, 0, true);
        java.awt.Rectangle viewRect = viewport.getViewRect();
        rect.setLocation(rect.x - viewRect.x, rect.y - viewRect.y);
        viewport.scrollRectToVisible(rect);
    }

    /**
     * The RequestScroll method initiates a sequence of events to scroll an ListView field line to a specified position in the ListView field display area, moving other lines into and out of the display area as necessary.
     * @param pLine desired line
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

            return;
        JViewport viewport = (JViewport)table.getParent();
        java.awt.Rectangle rect = table.getCellRect(pRow, 0, true);
        java.awt.Rectangle viewRect = viewport.getViewRect();
        rect.setLocation(rect.x - viewRect.x, rect.y - viewRect.y);
        viewport.scrollRectToVisible(rect);
    }

    /**
     * The RequestScroll method initiates a sequence of events to scroll an ListView field line to a specified position in the ListView field display area, moving other lines into and out of the display area as necessary.
     * @param pLine desired line
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

            JViewport viewport = (JViewport)jt.getParent();
            TreePath tp = jt.getPathForRow(line);
            java.awt.Rectangle rect = jt.getPathBounds(tp);
            java.awt.Rectangle viewRect = viewport.getViewRect();
            rect.setLocation(rect.x - viewRect.x, rect.y - viewRect.y);
            viewport.scrollRectToVisible(rect);

        }
    }

    public static void request(JTextArea comp, int line, int scrollPolicy){
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

            JViewport viewport = (JViewport)jt.getParent();
            TreePath tp = jt.getPathForRow(line);
            java.awt.Rectangle rect = jt.getPathBounds(tp);
            java.awt.Rectangle viewRect = viewport.getViewRect();
            rect.setLocation(rect.x - viewRect.x, rect.y - viewRect.y);
            viewport.scrollRectToVisible(rect);

        }
    }

    public static void request(JTextArea comp, int line, int scrollPolicy){
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

            JViewport viewport = (JViewport)jt.getParent();
            TreePath tp = jt.getPathForRow(line);
            java.awt.Rectangle rect = jt.getPathBounds(tp);
            java.awt.Rectangle viewRect = viewport.getViewRect();
            rect.setLocation(rect.x - viewRect.x, rect.y - viewRect.y);
            viewport.scrollRectToVisible(rect);

        }
    }

    public static void request(JTextArea comp, int line, int scrollPolicy){
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

            return;
        JViewport viewport = (JViewport)table.getParent();
        java.awt.Rectangle rect = table.getCellRect(pRow, 0, true);
        java.awt.Rectangle viewRect = viewport.getViewRect();
        rect.setLocation(rect.x - viewRect.x, rect.y - viewRect.y);
        viewport.scrollRectToVisible(rect);
    }

    /**
     * The RequestScroll method initiates a sequence of events to scroll an ListView field line to a specified position in the ListView field display area, moving other lines into and out of the display area as necessary.
     * @param pLine desired line
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

    // Translate the cell location so that it is relative
    // to the view, assuming the northwest corner of the
    // view is (0,0)
    rect.setLocation(rect.x - pt.x, rect.y - pt.y);
    // Scroll the area into view
    viewport.scrollRectToVisible(rect);
  }

  public static JTable createStandardSortableTable(TableModel tableModel) {
    JTable table = new JTable(tableModel);
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

      int cx=x*fontW+fontW/2;
      int cy=y*fontH+fontH/2;
     
      Rectangle bounds=containing.getBounds();
      bounds.setLocation(cx-bounds.width/2+getX(), cy-bounds.height/2+getY());
      containing.scrollRectToVisible(bounds);
    }
  }
 
  /**
   * Supposed to report when a location(usually player char) is
View Full Code Here

Examples of javax.swing.JViewport.scrollRectToVisible()

        // to the view, assuming the northwest corner of the
        // view is (0,0)
        rect.setLocation(rect.x-pt.x, rect.y-pt.y);
   
        // Scroll the area into view
        viewport.scrollRectToVisible(rect);
    }

  /**
   * Create thread that will cancel the editing state of the given TableCellEditor
   * after CELL_EDITING_STATE_PERIOD time in which with no pressing was made.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.