Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: gef/src/org/tigris/gef/base SelectionResize.java

gef
Discussion topic

Back to topic list

CVS update: gef/src/org/tigris/gef/base SelectionResize.java

Reply

Author 1sturm
Full name Thorsten Sturm
Date 2001-04-26 01:37:22 PDT
Message User: 1sturm
  Date: 01/04/26 01:37:22

  Modified: src/org/tigris/gef/base SelectionResize.java
  Log:
  minor fixes
  
  Revision Changes Path
  1.2 +12 -5 gef/src/org/tigris/g​ef/base/SelectionRes​ize.java
  
  Index: SelectionResize.java
  ====================​====================​====================​=======
  RCS file: /cvs/gef/src/org/tig​ris/gef/base/Selecti​onResize.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SelectionResize.java 2000/09/04 12:38:46 1.1
  +++ SelectionResize.java 2001/04/26 08:37:22 1.2
  @@ -27,7 +27,7 @@
   // File: SelectionResize.java
   // Classes: SelectionResize
   // Original Author: jrobbins at ics dot uci dot edu
  -// $Id: SelectionResize.java,v 1.1 2000/09/04 12:38:46 1sturm Exp $
  +// $Id: SelectionResize.java,v 1.2 2001/04/26 08:37:22 1sturm Exp $
   
   package org.tigris.gef.base;
   
  @@ -68,7 +68,9 @@
      * </pre>
      */
     public void hitHandle(Rectangle r, Handle h) {
  - updateHandleBox();
  + if (!_content.isResizable()) return;
  +
  + updateHandleBox();
       Rectangle testRect = new Rectangle(0, 0, 0, 0);
       testRect.setBounds(c​x-HAND_SIZE/2, cy-HAND_SIZE/2,
                HAND_SIZE, ch+HAND_SIZE/2);
  @@ -116,7 +118,9 @@
     /** Paint the handles at the four corners and midway along each edge
      * of the bounding box. */
     public void paint(Graphics g) {
  - updateHandleBox();
  + if (!_content.isResizable()) return;
  +
  + updateHandleBox();
       g.setColor(Globals.g​etPrefs().handleColo​rFor(_content));
       g.fillRect(cx - HAND_SIZE/2, cy - HAND_SIZE/2, HAND_SIZE, HAND_SIZE);
       g.fillRect(cx + cw - HAND_SIZE/2, cy - HAND_SIZE/2, HAND_SIZE, HAND_SIZE);
  @@ -130,8 +134,11 @@
      * handles. Needs-More-Work: someday I might implement resizing that
      * maintains the aspect ratio. */
     public void dragHandle(int mX, int mY, int anX, int anY, Handle hand) {
  - updateHandleBox();
  - int x = cx; int y = cy; int w = cw; int h = ch;
  + if (!_content.isResizable()) return;
  +
  + updateHandleBox();
  +
  + int x = cx; int y = cy; int w = cw; int h = ch;
       int newX = x, newY = y, newW = w, newH = h;
       Dimension minSize = _content.getMinimumSize();
       int minWidth = minSize.width, minHeight = minSize.height;

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: gef/src/org/tigris/gef/base SelectionResize.java 1sturm Thorsten Sturm 2001-04-26 01:37:22 PDT
Messages per page: