Revision: 2734
http://sourceforge.net/p/swingme/code/2734
Author: yuranet
Date: 2023-04-26 12:52:11 +0000 (Wed, 26 Apr 2023)
Log Message:
-----------
javadoc update
Modified Paths:
--------------
SwingME/src/net/yura/mobile/gui/DesktopPane.java
SwingME/src/net/yura/mobile/gui/KeyEvent.java
SwingME/src/net/yura/mobile/gui/components/Component.java
SwingME/src/net/yura/mobile/gui/components/List.java
SwingME/src/net/yura/mobile/gui/components/TextArea.java
SwingME/src/net/yura/mobile/gui/components/ToolTip.java
Modified: SwingME/src/net/yura/mobile/gui/DesktopPane.java
===================================================================
--- SwingME/src/net/yura/mobile/gui/DesktopPane.java 2023-04-26 12:14:15 UTC (rev 2733)
+++ SwingME/src/net/yura/mobile/gui/DesktopPane.java 2023-04-26 12:52:11 UTC (rev 2734)
@@ -1416,7 +1416,6 @@
* @see javax.microedition.lcdui.ScmCanvas#mouseReleased(int, int, int, int)
*/
private void pointerEvent(int type, int x, int y) {
-
//System.out.println("SM pointerEvent "+pointerComponent+" point="+type+" "+x+" "+y);
try {
@@ -1453,6 +1452,8 @@
}
// check its dragged more then 5px
else if (!(isAccurate(pointerFirstX, x, inaccuracy) && isAccurate(pointerFirstY, y, inaccuracy))) {
+ // we do NOT yet have the x and y for this event inside the component (calculated further down)
+ // we send 0,0 as there is nothing the component should be doing with the location anyway
pointerComponent.processMouseEvent(CANCEL, 0, 0, keypad);
pointerComponent = null;
@@ -1539,7 +1540,7 @@
toast.repaint();
animateComponent(toast);
}
-
+
private void showHideToolTip(boolean show, Component comp) {
// if a tooltip should be setup
Modified: SwingME/src/net/yura/mobile/gui/KeyEvent.java
===================================================================
--- SwingME/src/net/yura/mobile/gui/KeyEvent.java 2023-04-26 12:14:15 UTC (rev 2733)
+++ SwingME/src/net/yura/mobile/gui/KeyEvent.java 2023-04-26 12:52:11 UTC (rev 2734)
@@ -92,7 +92,7 @@
/**
* MS4SE Right Click Key
- * @see java.awt.event.MouseEvent#isPopupTrigger()
+ * also used on mobile when there is a long press event
*/
public static final int KEY_RIGHT_CLICK = -51;
Modified: SwingME/src/net/yura/mobile/gui/components/Component.java
===================================================================
--- SwingME/src/net/yura/mobile/gui/components/Component.java 2023-04-26 12:14:15 UTC (rev 2733)
+++ SwingME/src/net/yura/mobile/gui/components/Component.java 2023-04-26 12:52:11 UTC (rev 2734)
@@ -18,7 +18,6 @@
package net.yura.mobile.gui.components;
import javax.microedition.lcdui.Canvas;
-
import net.yura.mobile.gui.ChangeListener;
import net.yura.mobile.gui.DesktopPane;
import net.yura.mobile.gui.Graphics2D;
@@ -484,7 +483,9 @@
public abstract void paintComponent(Graphics2D g);
/**
+ * @return true if the event has been consumed
* @see javax.swing.JComponent#processKeyEvent(java.awt.event.KeyEvent) JComponent.processKeyEvent
+ * @see awt.event.InputEvent#consume()
*/
public boolean processKeyEvent(KeyEvent keypad) {
return false;
@@ -491,9 +492,7 @@
}
/**
- * @return true if the event has been consumed and should not trigger any more actions, usually when popupmenu is triggered.
* @see java.awt.Component#processMouseEvent(java.awt.event.MouseEvent) Component.processMouseEvent
- * @see awt.event.InputEvent#consume()
*/
public void processMouseEvent(int type, int x, int y, KeyEvent buttons) {
Modified: SwingME/src/net/yura/mobile/gui/components/List.java
===================================================================
--- SwingME/src/net/yura/mobile/gui/components/List.java 2023-04-26 12:14:15 UTC (rev 2733)
+++ SwingME/src/net/yura/mobile/gui/components/List.java 2023-04-26 12:52:11 UTC (rev 2734)
@@ -204,7 +204,6 @@
totalWidth=w;
}
}
-
}
width = totalWidth;
@@ -228,7 +227,6 @@
ensureIndexIsVisible(ensureIndexIsVisible);
}
}
-
}
/**
@@ -385,7 +383,6 @@
offset = offset + ((layoutOrientation==HORIZONTAL)?cw:ch);
}
-
}
return new int[] {ri,roffset} ;
@@ -446,10 +443,7 @@
}
offset = offset + ((layoutOrientation==HORIZONTAL)?c.getWidthWithBorder():c.getHeightWithBorder());
-
}
-
-
}
/**
@@ -492,7 +486,6 @@
// this is used by android menus and all other wrapping lists
// if we are not HORIZONTAL or VERTICAL
return getComponentFor(a,offset); // offset is ZERO
-
}
protected Component getComponentFor(int i,int offset) {
@@ -688,12 +681,10 @@
selectNewKey(i,keypad);
return true;
-
}
}
return false;
-
}
else if (keypad.isDownAction(Canvas.DOWN)) {
@@ -713,7 +704,6 @@
return false;
//}
-
}
else if (keypad.isDownAction(Canvas.UP)) {
@@ -732,7 +722,6 @@
}
return false;
//}
-
}
else if (keypad.isDownAction(Canvas.RIGHT)) {
@@ -754,7 +743,6 @@
return false;
//}
-
}
else if (keypad.isDownAction(Canvas.LEFT)) {
@@ -774,7 +762,6 @@
return false;
//}
-
}
else if (keypad.justPressedAction(Canvas.FIRE) || keypad.justPressedKey('\n')) {
if (isCtrlKeyDown(keypad)) {
@@ -799,7 +786,6 @@
return true;
}
return false;
-
}
/**
@@ -820,8 +806,6 @@
return current;
}
-
-
/**
* @param a the index of the one cell to select
* @see javax.swing.JList#setSelectedIndex(int) JList.setSelectedIndex
@@ -925,7 +909,6 @@
Logger.warn("unknown command in List actionPerformed: " + actionCommand);
}
//#enddebug
-
}
public boolean isUseSelectButton() {
Modified: SwingME/src/net/yura/mobile/gui/components/TextArea.java
===================================================================
--- SwingME/src/net/yura/mobile/gui/components/TextArea.java 2023-04-26 12:14:15 UTC (rev 2733)
+++ SwingME/src/net/yura/mobile/gui/components/TextArea.java 2023-04-26 12:52:11 UTC (rev 2734)
@@ -198,7 +198,6 @@
this.lineSpacing = lineSpacing;
}
-
/**
* Get the line spacing
* @see javax.swing.text.StyleConstants#getLineSpacing() StyleConstants.getLineSpacing
@@ -272,11 +271,8 @@
setCaretPosition(text.length()); // not sure if this should be always done
}
}
-
-
}
-
protected void changedUpdate(int offset,int length) {
if (lines==null) return;
@@ -329,7 +325,6 @@
gotoLine(line-1,caretPixelOffset);
return true;
}
-
}
else if (keyEvent.isDownAction(Canvas.DOWN)) {
@@ -340,7 +335,6 @@
gotoLine(line+1,caretPixelOffset);
return true;
}
-
}
}
@@ -358,10 +352,8 @@
int mid = searchStringCharOffset(text,font,xPixelOffset);
setCaretPosition(startOfLineOffset+mid);
-
}
-
public void processMouseEvent(int type, int x, int y, KeyEvent keys) {
super.processMouseEvent(type, x, y, keys);
if (focusable) {
Modified: SwingME/src/net/yura/mobile/gui/components/ToolTip.java
===================================================================
--- SwingME/src/net/yura/mobile/gui/components/ToolTip.java 2023-04-26 12:14:15 UTC (rev 2733)
+++ SwingME/src/net/yura/mobile/gui/components/ToolTip.java 2023-04-26 12:52:11 UTC (rev 2734)
@@ -57,5 +57,4 @@
public void setShowing(boolean b) {
showing = b;
}
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|