Package java.awt

Examples of java.awt.Point


    // create popup menu and show
    JTextComponent tc = (JTextComponent) comp;
    JPopupMenu menu = new JPopupMenu();
    addStandardContextMenu(tc, menu);

    Point pt = SwingUtilities
        .convertPoint(me.getComponent(), me.getPoint(), tc);
    menu.show(tc, pt.x, pt.y);
  }
View Full Code Here


    if((!mPaint1 && mCue.equals(mList1)) || (!mPaint2 && mCue.equals(mList2))) {
      mCue = null;
    }
   
    if (mCue != null) {
      Point p = e.getLocation();
      Rectangle rect = mCue.getVisibleRect();
      int i = mCue.locationToIndex(p);
     
      if(i != -1) {
        Rectangle listRect = mCue.getCellBounds(mCue.locationToIndex(p),
View Full Code Here

    mCloseButton.addActionListener(this);
    mDialog.getRootPane().setDefaultButton(mCloseButton);

    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Window vaterWindow = mDialog.getOwner();
    Point vaterLocation = vaterWindow.getLocation();
    Dimension vaterSize = vaterWindow.getSize();

    // Preferred
    Point hilfeLocation = new Point(vaterLocation.x + vaterSize.width, vaterLocation.y);
    Dimension hilfeSize = new Dimension(screenSize.width - hilfeLocation.x, vaterSize.height);

    // check if size is OK
    if (hilfeSize.width < MIN_HELP_DIALOG_SIZE.width) {
      hilfeSize.width = MIN_HELP_DIALOG_SIZE.width;
View Full Code Here

       
        // a certain number of rows are created
        for (int i = 0; i < rows; i++) {
            this.rows.add(new Row(columns));
        }
        curPosition = new Point(0, 0);
       
        // the DEFAULT widths are calculated
        widths = new float[columns];
        float width = 100f / columns;
        for (int i = 0; i < columns; i++) {
View Full Code Here

     * @param       row     The row where the <CODE>Cell</CODE> will be added
     * @param       column  The column where the <CODE>Cell</CODE> will be added
     * @throws BadElementException
     */
    public void addCell(Cell aCell, int row, int column) throws BadElementException {
        addCell(aCell, new Point(row,column));
    }
View Full Code Here

     * @param       row     The row where the <CODE>Cell</CODE> will be added
     * @param       column  The column where the <CODE>Cell</CODE> will be added
     */
    public void insertTable(Table aTable, int row, int column) {
        if (aTable == null) throw new NullPointerException("insertTable - table has null-value");
        insertTable(aTable, new Point(row, column));
    }
View Full Code Here

                            // adjust spans for cell
                            ((Cell) aElement).setRowspan(((Cell) ((Row) rows.get(i)).getCell(j)).getRowspan() + lDummyHeights[i] - 1);
                            ((Cell) aElement).setColspan(((Cell) ((Row) rows.get(i)).getCell(j)).getColspan() + lDummyWidths[j] - 1);
                           
                            // most likely this cell covers a larger area because of the row/cols splits : define not-to-be-filled cells
                            placeCell(newRows,((Cell) aElement), new Point(lDummyRow,lDummyColumn));
                        }
                    }
                    lDummyColumn += lDummyWidths[j];
                }
                lDummyRow += lDummyHeights[i];
View Full Code Here

    private void fillEmptyMatrixCells() {
        try {
            for (int i=0; i < rows.size(); i++) {
                for (int j=0; j < columns; j++) {
                    if (!((Row) rows.get(i)).isReserved(j)) {
                        addCell(defaultCell, new Point(i, j));
                    }
                }
            }
        }
        catch(BadElementException bee) {
View Full Code Here

            }
        }
        while (
        (i < rows.size()) && (j < columns) && (((Row) rows.get(i)).isReserved(j))
        );
        curPosition = new Point(i, j);
    }
View Full Code Here

        String url = getSharedContext().getUac().resolveURI(filename);
        if (isAnchorInCurrentDocument(filename)) {
            String id = getAnchorId(filename);
            Box box = getSharedContext().getBoxById(id);
            if (box != null) {
                Point pt;
                if (box.getStyle().isInline()) {
                    pt = new Point(box.getAbsX(), box.getAbsY());
                } else {
                    RectPropertySet margin = box.getMargin(getLayoutContext());
                    pt = new Point(
                            box.getAbsX() + (int)margin.left(),
                            box.getAbsY() + (int)margin.top());
                }
                scrollTo(pt);
                return;
View Full Code Here

TOP

Related Classes of java.awt.Point

Copyright © 2018 www.massapicom. 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.