[Thinlet-development] thinlet/src/thinlet Widget.java,1.7,1.8 Thinlet.java,1.9,1.10
Brought to you by:
bajzat
|
From: <ba...@us...> - 2003-03-25 18:14:25
|
Update of /cvsroot/thinlet/thinlet/src/thinlet
In directory sc8-pr-cvs1:/tmp/cvs-serv14044/src/thinlet
Modified Files:
Widget.java Thinlet.java
Log Message:
list/tree/table scroll bug fixed
Index: Widget.java
===================================================================
RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Widget.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Widget.java 24 Mar 2003 19:46:41 -0000 1.7
+++ Widget.java 25 Mar 2003 18:14:14 -0000 1.8
@@ -17,13 +17,13 @@
widget = Thinlet.create(classname);
}
-<<<<<<< Widget.java
+ /**
+ *
+ */
public String getClassName() {
return null;
}
-=======
->>>>>>> 1.6
/**
*
*/
Index: Thinlet.java
===================================================================
RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Thinlet.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Thinlet.java 24 Mar 2003 19:46:40 -0000 1.9
+++ Thinlet.java 25 Mar 2003 18:14:14 -0000 1.10
@@ -2281,11 +2281,24 @@
}
/**
- *
+ * Paint component icon and text (using default or custom font)
+ * @param component
+ * @param g
+ * @param clipx
+ * @param clipy
+ * @param clipwidth
+ * @param clipheight
+ * @param x
+ * @param y
+ * @param width
+ * @param height
+ * @param foreground default text color if custom foreground is null
+ * @param defaultalignment
+ * @param checkmnemonic find mnemonic index and underline text
*/
private void paintContent(Object component, Graphics g,
int clipx, int clipy, int clipwidth, int clipheight,
- int x, int y, int width, int height, Color fg, String defaultalignment,
+ int x, int y, int width, int height, Color foreground, String defaultalignment,
boolean checkmnemonic) {
String text = getString(component, "text", null);
Image icon = getIcon(component, "icon", null);
@@ -2303,7 +2316,7 @@
ta = fm.getAscent();
th = fm.getDescent() + ta;
Color customfg = (Color) get(component, "foreground"); //+no if disabled
- g.setColor((customfg != null) ? customfg : fg);
+ g.setColor((customfg != null) ? customfg : foreground);
}
int iw = 0, ih = 0;
if (icon != null) {
@@ -3581,9 +3594,9 @@
if (((id == MouseEvent.MOUSE_PRESSED)||
((id == MouseEvent.MOUSE_DRAGGED) &&
!shiftdown && !controldown))) {
- Rectangle view = getRectangle(component, ":view");
- Rectangle viewport = getRectangle(component, ":port");
- int my = y + view.y - referencey;
+ //Rectangle view = getRectangle(component, ":view");
+ Rectangle port = getRectangle(component, ":port");
+ int my = y + port.y - referencey;
for (Object item = get(component, ":comp"); item != null;) {
Rectangle r = getRectangle(item, "bounds");
if (my < r.y + r.height) {
@@ -3591,7 +3604,7 @@
scrollToVisible(component, r.x, r.y, 0, r.height);
}
else if ("tree" == classname) {
- int mx = x + view.x - referencex;
+ int mx = x + port.x - referencex;
if (mx < r.x) {
if ((mx >= r.x - block) && (get(item, ":comp") != null)) {
boolean expanded = getBoolean(item, "expanded", true);
|