Package org.openbp.swing.components

Examples of org.openbp.swing.components.DragGlassPane.drawRectangle()


    // Convert the point to glass pane coordinates
    Point offset = SwingUtilities.convertPoint(subject, x, y, gp);

    // Draw the target rectangle
    Rectangle targetRect = new Rectangle(offset.x, offset.y, subject.getWidth(), subject.getHeight());
    gp.drawRectangle(targetRect, true);
  }

  private void clearTargetRect()
  {
    // Deactivate the drag shadow glass pane again
View Full Code Here


      // Convert the point to glass pane coordinates
      Point barLoc = SwingUtilities.convertPoint(this, delta, gp);

      // Draw the target rectangle
      Rectangle targetRect = new Rectangle(barLoc.x, barLoc.y, getWidth(), getHeight());
      gp.drawRectangle(targetRect, true);
    }
  }

  /**
   * A mouse button has been released.
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.