Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25359/src/net/sourceforge/bprocessor/gui
Modified Files:
GUI.java
Log Message:
Added scale and basis for obj import
Index: GUI.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** GUI.java 17 Oct 2007 09:08:11 -0000 1.77
--- GUI.java 22 Oct 2007 10:00:17 -0000 1.78
***************
*** 556,559 ****
--- 556,586 ----
*/
public void alert(String string) {
+ java.awt.Point where = null;
+ try {
+ where = getFocusOwner().getLocationOnScreen();
+ } catch (Exception e) {
+ log.warn(e.getMessage());
+ }
+ if (where == null) {
+ where = getMousePosition();
+ if (where == null) {
+ where = getInstance().getLocation();
+ } else {
+ where.x += 5;
+ where.y += 5;
+ }
+ } else {
+ where.y += getFocusOwner().getSize().height;
+ }
+ alert(string, where);
+ }
+
+ /**
+ * Print a alert message in the gui
+ * at the moment it just prints it on the command line
+ * @param string The alert string
+ * @param where The place to show alert window
+ */
+ public void alert(String string, java.awt.Point where) {
if (alertWindow == null) {
alertWindow = new JWindow(this);
***************
*** 596,617 ****
// to Make sure the window size is correct pack have to be called twice
alertWindow.pack();
-
- java.awt.Point where = null;
- try {
- where = getFocusOwner().getLocationOnScreen();
- } catch (Exception e) {
- log.warn(e.getMessage());
- }
- if (where == null) {
- where = getMousePosition();
- if (where == null) {
- where = getInstance().getLocation();
- } else {
- where.x += 5;
- where.y += 5;
- }
- } else {
- where.y += getFocusOwner().getSize().height;
- }
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
--- 623,626 ----
|