thinlet-development Mailing List for Thinlet (Page 7)
Brought to you by:
bajzat
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(22) |
Apr
(7) |
May
(26) |
Jun
(42) |
Jul
(9) |
Aug
(3) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(6) |
Jun
(12) |
Jul
(2) |
Aug
(9) |
Sep
(1) |
Oct
(8) |
Nov
(1) |
Dec
|
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(13) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <KD...@tw...> - 2003-04-25 18:00:41
|
Is there documentation on the latest version of Thinlets 1.13. Something that will tell me easily all the attributes for each widgets. The one that I downloaded is way out of date. kmd Phone (608)273-8933 x2084 Cell (608)358-1599 |
From: <ab...@us...> - 2003-04-15 20:18:19
|
Update of /cvsroot/thinlet/thinlet/src/thinlet In directory sc8-pr-cvs1:/tmp/cvs-serv31782 Modified Files: Thinlet.java Log Message: API setter for "font" property on a component. Index: Thinlet.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Thinlet.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Thinlet.java 15 Apr 2003 20:13:08 -0000 1.12 +++ Thinlet.java 15 Apr 2003 20:18:07 -0000 1.13 @@ -166,6 +166,16 @@ } /** + * Set custom font on a component + * + * @param component component to use the custom font + * @param font custom font to use, or null to reset component to use default font + */ + public void setFont(Object component, Font font) { + if (component != null) set(component, "font", font); + } + + /** * */ private void doLayout(Object component) { |
From: <ab...@us...> - 2003-04-15 20:13:14
|
Update of /cvsroot/thinlet/thinlet/src/thinlet In directory sc8-pr-cvs1:/tmp/cvs-serv28768 Modified Files: Thinlet.java Log Message: Allow input of characters with AltGraph modifier (common for certain keyboard layouts, e.g. in Nordic countries). Index: Thinlet.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Thinlet.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Thinlet.java 31 Mar 2003 19:11:45 -0000 1.11 +++ Thinlet.java 15 Apr 2003 20:13:08 -0000 1.12 @@ -3007,7 +3007,9 @@ int iend = end; String insert = null; if (editable && (keychar != 0) && - ((modifiers == 0) || (modifiers == InputEvent.SHIFT_MASK))) { + ( (modifiers == 0) || + (modifiers == InputEvent.SHIFT_MASK) || + (modifiers == InputEvent.ALT_GRAPH_MASK))) { insert = String.valueOf((char) keychar); } else if (editable && (keycode == KeyEvent.VK_ENTER)) { |
From: Law C. M. <la...@i2...> - 2003-04-03 02:53:47
|
Hi, is there any support for midp in the latest thinlet release? I have = invested too much in thinlet in my current midp project. Any ideas? Thanks |
From: <ba...@us...> - 2003-03-31 19:11:53
|
Update of /cvsroot/thinlet/thinlet/src/thinlet In directory sc8-pr-cvs1:/tmp/cvs-serv13878/src/thinlet Modified Files: Thinlet.java Log Message: table header paint quick fix Index: Thinlet.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Thinlet.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Thinlet.java 25 Mar 2003 18:14:14 -0000 1.10 +++ Thinlet.java 31 Mar 2003 19:11:45 -0000 1.11 @@ -432,19 +432,24 @@ } else if (("list" == classname) || ("table" == classname) || ("tree" == classname)) { - int line = getBoolean(component, "line", false) ? 1 : 0; + int line = getBoolean(component, "line", true) ? 1 : 0; int width = 0; int columnheight = 0; if ("table" == classname) { Object header = get(component, "header"); + int[] columnwidths = null; if (header != null) { - for (Object column = get(header, ":comp"); - column != null; column = get(column, ":next")) { - width += getInteger(column, "width", 80); + columnwidths = new int[getCount(header)]; + Object column = get(header, ":comp"); + for (int i = 0; i < columnwidths.length; i++) { + if (i != 0) { column = get(column, ":next"); } + columnwidths[i] = getInteger(column, "width", 80); + width += columnwidths[i]; Dimension d = getSize(column, 2, 2); columnheight = Math.max(columnheight, d.height); } } + set(component, ":widths", columnwidths); } int y = 0; int level = 0; @@ -786,7 +791,7 @@ } /** - * + * * @param item //FIX can be scrollbar string */ private void closeCombo(Object combobox, Object combolist, Object item) { if ((item != null) && getBoolean(item, "enabled", true)) { @@ -993,7 +998,6 @@ return new Dimension(width, height); } String classname = getClass(component); - //System.out.println("classname: " + classname); if ("label" == classname) { return getSize(component, 0, 0); } @@ -1359,18 +1363,10 @@ paint(g); } - /** - * - */ /*public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) { if (infoflags == ImageObserver.ALLBITS) { validate(content); } - System.out.println("imageUpdate " + x + ", " + y + ", " + width + ", " + height + " " + - (((infoflags & ABORT) > 0) ? "ABORT " : "") + (((infoflags & ALLBITS) > 0) ? "ALLBITS " : "") + - (((infoflags & ERROR) > 0) ? "ERROR " : "") + (((infoflags & FRAMEBITS) > 0) ? "FRAMEBITS " : "") + - (((infoflags & HEIGHT) > 0) ? "HEIGHT " : "") + (((infoflags & PROPERTIES) > 0) ? "PROPERTIES " : "") + - (((infoflags & SOMEBITS) > 0) ? "SOMEBITS " : "") + (((infoflags & WIDTH) > 0) ? "WIDTH " : "")); return super.imageUpdate(img, infoflags, x, y, width, height); }*/ @@ -2027,6 +2023,32 @@ if (("panel" != classname) && ("dialog" != classname)) { paintRect(g, port.x - 1, port.y - 1, port.width + (vneed ? 1 : 2), port.height + (hneed ? 1 : 2), enabled ? c_border : c_disable, c_textbg, true, true, !hneed, !vneed, true); + if ("table" == classname) { + Object header = get(component, "header"); + if (header != null) { + int[] columnwidths = (int []) get(component, ":widths"); + Object column = get(header, ":comp"); int x = 0; + for (int i = 0; i < columnwidths.length; i++) { + if (i != 0) { column = get(column, ":next"); } + boolean lastcolumn = (i == columnwidths.length - 1); + int width = lastcolumn ? (port.width - x + 2) : columnwidths[i]; + + paintRect(g, x - view.x, 0, width, port.y - 1, + enabled ? c_border : c_disable, enabled ? c_ctrl : c_bg, + true, true, false, lastcolumn, true); + paintContent(column, g, clipx, clipy, clipwidth, clipheight, + x + 2 - view.x, 1, width - 2, + port.y - 3, enabled ? c_text : c_disable, "left", false); + + Object sort = get(column, "sort"); // "none", "ascent", "descent" + if (sort != null) { + paintArrow(g, x - view.x + width - block, 0, block, port.y, + (sort == "ascent") ? 'S' : 'N'); + } + x += width; + } + } + } } int x1 = Math.max(clipx, port.x); int x2 = Math.min(clipx + clipwidth, port.x + port.width); @@ -2034,14 +2056,10 @@ int y2 = Math.min(clipy + clipheight, port.y + port.height); if ((x2 > x1) && (y2 > y1)) { g.clipRect(x1, y1, x2 - x1, y2 - y1); - //g.setColor(Color.blue); g.drawRect(x1, y1, x2 - x1- 1, y2 - y1- 1); g.translate(port.x - view.x, port.y - view.y); - //g.setColor(Color.red); g.fillRect(0, 0, 4, 4); paint(component, classname, focus, enabled, g, view.x - port.x + x1, view.y - port.y + y1, x2 - x1, y2 - y1, port.width, port.height, view.width); - //g.setColor(Color.blue); g.drawRect(view.x + x1 - 1, view.y + y1 - 1, x2 - x1 - 1, y2 - y1 - 1); - //g.setColor(Color.blue); g.drawRect(0, 0, view.width - 1, view.height - 1); g.translate(view.x - port.x, view.y - port.y); g.setClip(clipx, clipy, clipwidth, clipheight); @@ -2114,7 +2132,8 @@ } else { //if (("list" == classname) || ("table" == classname) || ("tree" == classname)) Object lead = get(component, ":lead"); - boolean line = getBoolean(component, "line", false); int iline = line ? 1 : 0; + int[] columnwidths = ("table" == classname) ? ((int []) get(component, ":widths")) : null; + boolean line = getBoolean(component, "line", true); int iline = line ? 1 : 0; for (Object item = get(component, ":comp"), next = null; item != null; item = next) { if (focus && (lead == null)) { set(component, ":lead", lead = item); // draw first item focused when lead is null @@ -2163,17 +2182,17 @@ } } else { // tree - int x = 0; + int i = 0; int x = 0; for (Object cell = get(item, ":comp"); cell != null; cell = get(cell, ":next")) { if (clipx + clipwidth <= x) { break; } - int iwidth = 80; + int iwidth = columnwidths[i]; if (clipx < x + iwidth) { boolean cellenabled = enabled && getBoolean(cell, "enabled", true); paintContent(cell, g, clipx, clipy, clipwidth, clipheight, r.x + x + 1, r.y + 1, iwidth - 2, r.height - 3, cellenabled ? c_text : c_disable, "left", false); } - x += iwidth; + i++; x += iwidth; } } } @@ -2204,11 +2223,6 @@ g.drawLine(x + width - 1, y + height - 1, x + width - 1, y); width--; if (width <= 0) return; } - /*g.setColor(border.brighter()); - if (top && left) g.fillRect(x - 1, y - 1, 1, 1); - if (top && right) g.fillRect(x + width, y - 1, 1, 1); - if (bottom && left) g.fillRect(x - 1, y + height, 1, 1); - if (bottom && right) g.fillRect(x + width, y + height, 1, 1);*/ if (bg == c_ctrl) { if (horizontal) { @@ -2370,7 +2384,6 @@ } else if ((watchdelay == 375L) || (watchdelay == 75L)) { if (processSpin(mousepressed, pressedpart)) { setTimer(75L); } } else if (watchdelay == 750L) { - //System.out.println("> tip: " + getClass(mouseinside) + " : " + ((insidepart instanceof Object[]) ? getClass(insidepart) : insidepart)); showTip(); } } @@ -2527,7 +2540,7 @@ int rotation = ((Integer) wheelrotation.invoke(e, null)).intValue(); if (port.x + port.width < bounds.width) { // has vertical scrollbar - processScroll(mouseinside, (rotation > 0) ? "down" : "up"); + processScroll(mouseinside, (rotation > 0) ? "down" : "up"); //TODO scroll panels too } else if (port.y + port.height < bounds.height) { // has horizontal scrollbar processScroll(mouseinside, (rotation > 0) ? "right" : "left"); @@ -2595,7 +2608,6 @@ else if ((id == ComponentEvent.COMPONENT_RESIZED) || (id == ComponentEvent.COMPONENT_SHOWN)) { Dimension d = getSize(); - //System.out.println(id + ": " + d.width + ", " + d.height); setRectangle(content, "bounds", 0, 0, d.width, d.height); validate(content); closeup(); @@ -2611,27 +2623,6 @@ handleMouseEvent(mousex, mousex, 1, false, false, false, MouseEvent.MOUSE_ENTERED, mouseinside, insidepart); } - - /** - * - */ - /*private boolean processKeyPress(Object component, - KeyEvent e, int keycode, Object invoker) { - if (processKeyPress(component, e, keycode)) { return true; } - for (Object comp = get(component, ":comp"); - comp != null; comp = get(comp, ":next")) { - if ((comp != invoker) && processKeyPress(comp, e, keycode, null)) { - return true; - } - } - if ((invoker != null) && (component != content)) { - Object parent = getParent(component); - if (parent != null) { - return processKeyPress(parent, e, keycode, component); - } - } - return false; - }*/ /** * @@ -3374,12 +3365,7 @@ scrollToVisible(component, r.x, r.y, 0, r.height); } } - } - - /*public void repaint(int x, int y, int width, int height) { - System.out.println("repaint(" + x + ", " + y + ", " + width + ", " + height + ")"); - super.repaint(x, y, width, height); - }*/ + } /** * @param x mouse x position relative to thinlet component @@ -3388,7 +3374,6 @@ private void handleMouseEvent(int x, int y, int clickcount, boolean shiftdown, boolean controldown, boolean popuptrigger, int id, Object component, Object part) { - //if (id == MouseEvent.MOUSE_ENTERED) { System.out.println("enter " + getClass(component)); } if (id == MouseEvent.MOUSE_ENTERED) { setTimer(750L); } @@ -3418,7 +3403,7 @@ } else if ("combobox" == classname) { boolean editable = getBoolean(component, "editable", true); - if (editable && (part == null)) { + if (editable && (part == null)) { // textfield area Image icon = null; int left = ((id == MouseEvent.MOUSE_PRESSED) && ((icon = getIcon(component, "icon", null)) != null)) ? @@ -3433,11 +3418,11 @@ } else if (id == MouseEvent.MOUSE_PRESSED) { Object combolist = get(component, ":combolist"); - if (combolist == null) { + if (combolist == null) { // combolist is closed setFocus(component); repaint(component); popupCombo(component); - } else { + } else { // combolist is visible closeCombo(component, combolist, null); } } @@ -3445,7 +3430,7 @@ if (mouseinside != component) { Object combolist = get(component, ":combolist"); closeCombo(component, combolist, - (mouseinside == combolist) ? insidepart : null); + ((mouseinside == combolist) && (insidepart instanceof Object[])) ? insidepart : null); } else { repaint(component); } @@ -4181,14 +4166,6 @@ } else if ("table" == classname) { if (!findScroll(component, x, y)) { - /*Object header = get(component, "header"); - if (header != null) { - Rectangle view = getRectangle(component, ":view"); - for (Object column = get(header, ":comp"); - column != null; column = get(column, ":next")) { - if (getRectangle(column, "bounds").contains(x - view.x, y)) { System.out.println("column: " + get(column, "text")); break; } - } - }*/ } } else if ("tree" == classname) { @@ -4370,7 +4347,7 @@ * @return true, if the given component was focusable */ public boolean requestFocus(Object component) { //# - if (checkFocusable(component, true)) { + if (isFocusable(component, true)) { setFocus(component); return true; //repaint too! } return false; @@ -4396,57 +4373,6 @@ return false; } - /* - private boolean focus(Object component, boolean check) { - if (check) { - } - - for (Object comp = component; comp != content; comp = getParent(comp)) { - String classname = getClass(comp); - } - - for (Object comp = component; comp != content; comp = getParent(comp)) { - String classname = getClass(comp); - if (classname == "tab") { // select current tab - Object tabbedpane = getParent(comp); - int index = getIndex(tabbedpane, comp); - if (getInteger(tabbedpane, "selected", 0) != index) { - setInteger(tabbedpane, "selected", index, 0); - repaint(tabbedpane); - //invoke(tabbedpane, comp, "action"); - } - comp = tabbedpane; - } - else if ((classname == "panel") && getBoolean(comp, "scroll", false)) { - Rectangle bounds = getRectangle(comp->>, "bounds"); - scrollToVisible(comp, bounds.x, bounds.y, bounds.width, bounds.height); - } - } - - for (Object comp = component; comp != null;) { - if (!getBoolean(comp, "enabled", true) || !getBoolean(comp, "visible", true)) { - return false; - } - Object parent = getParent(comp); - if ((getClass(comp) == "tab") && (getItem(parent, - getInteger(parent, "selected", 0)) != comp)) { return false; } - comp = parent; - } - return true; - } - return false; - } - - private boolean focusable(String classname, boolean all) { - return (classname == "button") || - (classname == "checkbox") || ("togglebutton" == classname) || - (classname == "combobox") || (classname == "textfield") || - (classname == "passwordfield") || (classname == "textarea") || - (classname == "spinbox") || (classname == "slider") || - (classname == "list") || (classname == "table") || (classname == "tree") || - (classname == "tabbedpane") || (all && (classname == "splitpane")); - }*/ - /** * @return next focusable component is found (not the first of the desktop/dialog) */ @@ -4468,7 +4394,7 @@ } } if (next == current) { return false; } // one fucusable, no loop - if (checkFocusable(next, false)) { + if (isFocusable(next, false)) { setFocus(next); return consumed; } @@ -4508,7 +4434,7 @@ } if ((previous == null) && ((upward && backward) || (!start && !upward))) { previous = getPreviousFocusable(get(component, ":comp"), block, false, false, backward, outgo); - if ((previous == null) && checkFocusable(component, false)) { + if ((previous == null) && isFocusable(component, false)) { previous = component; } } @@ -4523,9 +4449,13 @@ } /** - * + * Check whether the given widget can become focusowner + * @param component check this widget + * @param forced splitpane is also checked + * (e.g. false for tab navigating, and true for mouse selection or application request) + * @return true if focusable, otherwise false */ - private boolean checkFocusable(Object component, boolean forced) { + private boolean isFocusable(Object component, boolean forced) { String classname = getClass(component); if ((classname == "button") || (classname == "checkbox") || ("togglebutton" == classname) || (classname == "combobox") || (classname == "textfield") || @@ -4534,10 +4464,12 @@ (classname == "list") || (classname == "table") || (classname == "tree") || (classname == "tabbedpane") || (forced && (classname == "splitpane"))) { for (Object comp = component; comp != null;) { + // component and parents are enabled and visible if (!getBoolean(comp, "enabled", true) || !getBoolean(comp, "visible", true)) { return false; } Object parent = getParent(comp); + // inside the selected tabbedpane tab if ((getClass(comp) == "tab") && (getItem(parent, getInteger(parent, "selected", 0)) != comp)) { return false; } comp = parent; @@ -4547,16 +4479,6 @@ return false; } - /*if (cliparea == null) { add(cliparea = new TextArea()); } - cliparea.setText(content); - cliparea.selectAll(); - cliparea.dispatchEvent(new KeyEvent(this, KeyEvent.KEY_TYPED, 0L, KeyEvent.CTRL_MASK, 0, (char) 3)); - cliparea.selectAll(); - - if (cliparea == null) { add(cliparea = new TextArea()); } - cliparea.dispatchEvent(new KeyEvent(this, KeyEvent.KEY_TYPED, 0L, KeyEvent.CTRL_MASK, 0, (char) 22)); - cliparea.getText(); return cliparea.getText();*/ - // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- /** @@ -5090,21 +5012,6 @@ // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- - /*public String toXML(Object component) { - StringBuffer xml = new StringBuffer(); - Object[] entry = (Object[]) component; - String classname = (String) entry[1]; - while ((entry = (Object[]) entry[2]) != null) { - try { - Object[] definition = getDefinition(getClass(component), (String) entry[0], null); - if (definition != null) { - xml.append(" " + entry[0] + "=\"" + entry[1] + "\""); - } - } catch (IllegalArgumentException exc) {} - } - return xml.toString(); - }*/ - /** * Creates a component (and its subcomponents, and properties) * from the given xml resource @@ -5117,8 +5024,6 @@ public Object parse(String path) throws IOException { return parse(path, this); } - - /** * Creates a component from the given xml resource using the @@ -5133,16 +5038,12 @@ InputStream inputstream = null; try { inputstream = getClass().getResourceAsStream(path); - //System.out.println("> " + path + " " + inputstream); if (inputstream == null) { try { inputstream = new URL(path).openStream(); } catch (MalformedURLException mfe) { /* thows nullpointerexception*/ } } } catch (Throwable e) {} - //if (inputstream == null) { // applet code - // inputstream = new URL(getCodeBase(), path).openStream(); - //} return parse(inputstream, handler); } @@ -5457,18 +5358,6 @@ } } - /* - private String convert(StringBuffer text) { - StringBuffer converted = null; - for (int i = 0; i < text.length(); i++) { - if (text.charAt(i) == '&') { - int j = i; while (text.charAt(i++) != ';'); - } - if (converted == null) { converted = new StringBuffer(); } - } - return (converted == null) ? text.toString() : converted.toString(); - }*/ - /** * */ @@ -5496,13 +5385,6 @@ } } } - - /** - * Convert entities. - */ - //private static String convert(StringBuffer text) { - // return null; - //} /** * Add the component to the parent's ':comp' list, and set its ':parent' @@ -5556,7 +5438,6 @@ * */ private Object addElement(Object parent, String name) { - //System.out.println("create '" + name + "'"); Object component = create(name); addImpl(parent, component, -1); return component; @@ -5567,7 +5448,6 @@ * @throws java.lang.IllegalArgumentException */ private void addAttribute(Object component, String key, String value, Vector lasts) { - //System.out.println("attribute '" + key + "'='" + value + "'"); Object[] definition = getDefinition(getClass(component), key, null); key = (String) definition[1]; if ("string" == definition[0]) { @@ -5697,13 +5577,6 @@ " for " + currentname); } - /** - * - */ - //private void addContent(Object component, String content) { - //set(component, "content", content); - //} - // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- /** @@ -5807,6 +5680,7 @@ return (value != null) ? value : definition[3]; } + /*TODO method get; component, font, color, keystroke, bean set/get*/ /** * Sets a new event handler method for a component @@ -5956,25 +5830,6 @@ */ private boolean setString(Object component, String key, String value, String defaultvalue) { - /*boolean changed = set(component, key, value); - if (changed && ("name" == key)) { - //for (Class cls = getClass(); cls != null; cls = cls.getSuperclass()) { - Field[] fields = getClass().getDeclaredFields(); - for (int i = 0; i < fields.length; i++) { - if ((fields[i].getType() == Object.class) && - fields[i].getName().equals(value)) { - try { - fields[i].set(this, component); - return true; - } catch (IllegalAccessException iae) {} - } - } - //} - try { - getClass().getField(value).set(this, component); - } catch (Exception exc) {} - } - return changed;*/ return set(component, key, value); } @@ -6125,11 +5980,6 @@ } } catch (Throwable e) {} } - //if (image == null) { // applet code - // try { - // image = getImage(getCodeBase(), path); - // } catch (Throwable e) {} - //} if (preload && (image != null)) { MediaTracker mediatracker = new MediaTracker(this); mediatracker.addImage(image, 1); @@ -6273,7 +6123,7 @@ { "choice", "selection", "paint", selections }, { "method", "action", "", null }, { "method", "perform", "", null }, //...? - { "boolean", "line", "validate", Boolean.FALSE } }, + { "boolean", "line", "validate", Boolean.TRUE } }, "item", "choice", new Object[][] { { "boolean", "selected", "", Boolean.FALSE } }, "table", "list", new Object[][] { |
From: Andrzej B. <ab...@ge...> - 2003-03-27 16:41:57
|
Bajz=E1t R=F3bert wrote: > Currently there is a "line" property for list/table/tree and false by=20 > default (is true default value preferred?). Would you set it=20 > respectively for a widget, or use this (and tree angled linestyle) as=20 > global ui setting (similar to e.g. button padding)? >=20 In my opinion, it should be per widget (not global), and on by default.=20 If you compare it again with the Swing behaviour, defaults give you a=20 sensibly-looking widget. For lists and tables, my point of view is that=20 line=3D"true" makes most sense. However, I am of split mind with the current way the tree lead-lines=20 look. IMHO, they should be dotted - otherwise they are too heavy and too=20 distracting; and they should be completed, i.e. they now look very=20 strange (forgive my ASCII art below): - Item |_ Item |_ Item |_ Item |_ Item But they should look like this: - Item | |_ Item | | |_ Item | |_ Item |_ Item --=20 Best regards, Andrzej Bialecki ------------------------------------------------- Software Architect, System Integration Specialist CEN/ISSS EC Workshop, ECIMF project chair EU FP6 E-Commerce Expert/Evaluator ------------------------------------------------- FreeBSD developer (http://www.freebsd.org) |
From: <rb...@fr...> - 2003-03-26 11:33:04
|
Currently there is a "line" property for list/table/tree and false by default (is true default value preferred?). Would you set it respectively for a widget, or use this (and tree angled linestyle) as global ui setting (similar to e.g. button padding)? > Also, as I reported earlier, the row separation lines in lists are > missing. I think they are indispensible - they offer a very important > visual clue to follow the cells in row when reading. Also, could you > comment on your plans with the lead lines in tree widget? They seem to > be only half-finished now, and IMHO it's better to revert to previous > behaviour (no lead lines) instead of this... |
From: Andrzej B. <ab...@ge...> - 2003-03-26 11:14:02
|
ba...@us... wrote: > 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 Thanks, it's fixed now. Any prognosis as to when you can fix the bug with table headers (they don't show)? Also, as I reported earlier, the row separation lines in lists are missing. I think they are indispensible - they offer a very important visual clue to follow the cells in row when reading. Also, could you comment on your plans with the lead lines in tree widget? They seem to be only half-finished now, and IMHO it's better to revert to previous behaviour (no lead lines) instead of this... Thanks for your work! Andrzej. |
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); |
From: Andrzej B. <ab...@ge...> - 2003-03-25 11:47:49
|
ba...@us... wrote: > Update of /cvsroot/thinlet/thinlet/src/thinlet > In directory sc8-pr-cvs1:/tmp/cvs-serv25476/src/thinlet > > Modified Files: > Thinlet.java Widget.java > Log Message: > scrollable and titled panel, scrollable dialog content > Widget.java is broken because of unresolved merging. You should have corrected this error first, before committing. CVS informs you during update operation that there were conflicts, like this: C Widget.java This means that the file needs to be edited, and the conflict marks removed before the commit operation. Please correct it. Also, the table headers are still broken, and now the selection on trees and lists works funky - sometimes when you click it's wrong items that are selected, sometimes none at all. > > Index: Widget.java > =================================================================== > RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Widget.java,v > retrieving revision 1.6 > retrieving revision 1.7 > diff -u -d -r1.6 -r1.7 > --- Widget.java 19 Mar 2003 23:36:51 -0000 1.6 > +++ Widget.java 24 Mar 2003 19:46:41 -0000 1.7 > @@ -17,6 +17,13 @@ > widget = Thinlet.create(classname); > } > > +<<<<<<< Widget.java > + public String getClassName() { > + return null; > + } > + > +======= > +>>>>>>> 1.6 > /** > * > */ -- -- Best regards, Andrzej Bialecki ------------------------------------------------- Software Architect, System Integration Specialist CEN/ISSS EC Workshop, ECIMF project chair EU FP6 E-Commerce Expert/Evaluator ------------------------------------------------- FreeBSD developer (http://www.freebsd.org) |
From: <ba...@us...> - 2003-03-24 19:46:50
|
Update of /cvsroot/thinlet/thinlet/src/thinlet In directory sc8-pr-cvs1:/tmp/cvs-serv25476/src/thinlet Modified Files: Thinlet.java Widget.java Log Message: scrollable and titled panel, scrollable dialog content Index: Thinlet.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Thinlet.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Thinlet.java 10 Mar 2003 21:29:30 -0000 1.8 +++ Thinlet.java 24 Mar 2003 19:46:40 -0000 1.9 @@ -286,6 +286,7 @@ } Dimension title = getSize(component, 0, 0); // title text and icon + setInteger(component, ":titleheight", title.height, 0); boolean scrollable = getBoolean(component, "scrollable", false); boolean border = ("panel" == classname) && getBoolean(component, "border", false); int iborder = (border ? 1 : 0); @@ -301,28 +302,31 @@ 3 + title.height, 3, 3, 3, true, 0); } } - - int areax = 0; int areay = 0; int areawidth = 0; int areaheight = 0; - if (scrollable) { - // components are relative to the viewport - Rectangle port = getRectangle(component, ":port"); - areawidth = port.width; areaheight = port.height; + if (!scrollable) { // clear scrollpane bounds //+ + set(component, ":view", null); set(component, ":port", null); } - else { // scrollpane isn't required - // components are relative to top/left corner - Rectangle bounds = getRectangle(component, "bounds"); - areawidth = bounds.width; areaheight = bounds.height; - if ("panel" == classname) { - areax = iborder; areay = Math.max(iborder, title.height); - areawidth -= 2 * iborder; areaheight -= areay - iborder; + + if (grid != null) { + int areax = 0; int areay = 0; int areawidth = 0; int areaheight = 0; + if (scrollable) { + // components are relative to the viewport + Rectangle view = getRectangle(component, ":view"); + areawidth = view.width; areaheight = view.height; } - else { // dialog - areax = 4; areay = 4 + title.height; - areawidth -= 8; areaheight -= areay + 4; + else { // scrollpane isn't required + // components are relative to top/left corner + Rectangle bounds = getRectangle(component, "bounds"); + areawidth = bounds.width; areaheight = bounds.height; + if ("panel" == classname) { + areax = iborder; areay = Math.max(iborder, title.height); + areawidth -= 2 * iborder; areaheight -= areay + iborder; + } + else { // dialog + areax = 4; areay = 4 + title.height; + areawidth -= 8; areaheight -= areay + 4; + } } - } - if (grid != null) { for (int i = 0; i < 2; i++) { // i=0: horizontal, i=1: vertical // remaining space int d = ((i == 0) ? (areawidth - contentwidth) : (areaheight - contentheight)); @@ -338,9 +342,8 @@ } } - int i = 0; - for (Object comp = get(component, ":comp"); - comp != null; comp = get(comp, ":next")) { + Object comp = get(component, ":comp"); + for (int i = 0; comp != null; comp = get(comp, ":next")) { if (!getBoolean(comp, "visible", true)) { continue; } int ix = areax + left + getSum(grid[0], 0, grid[4][i], gap, true); int iy = areay + top + getSum(grid[1], 0, grid[5][i], gap, true); @@ -697,6 +700,13 @@ else if (itemclass == "menu") { d.width += block; } + + // add accelerator width + String accelerator = getAccelerator(item); + if (accelerator != null) { + d.width += 4 + getFontMetrics(font).stringWidth(accelerator); //+ font, height and gap + } + setRectangle(item, "bounds", 1, 1 + ph, d.width, d.height); pw = Math.max(pw, d.width); ph += d.height; @@ -1065,8 +1075,9 @@ else if (getBoolean(component, "border", false)) { // bordered panel size.width = 2; size.height += (size.height > 0) ? 1 : 2; // title includes line } + else { size.width = 0; } // title width is clipped // add paddings - size.width = getInteger(component, "left", 0) + getInteger(component, "right", 0); + size.width += getInteger(component, "left", 0) + getInteger(component, "right", 0); size.height += getInteger(component, "top", 0) + getInteger(component, "bottom", 0); // add content preferred size int gap = getInteger(component, "gap", 0); @@ -1144,15 +1155,25 @@ } /** - * + * @param component a container + * @param gap space between components + * @return null for zero visible subcomponent, otherwise an array contains the following lists: + * <ul><li>columnwidths, preferred width of grid columns</li> + * <li>rowheights, preferred heights of grid rows</li> + * <li>columnweights, grid column-width weights</li> + * <li>rowweights, grid row-height weights</li> + * <li>gridx, horizontal location of the subcomponents</li> + * <li>gridy, vertical locations</li> + * <li>gridwidth, column spans</li> + * <li>gridheight, row spans</li></ul> */ private int[][] getGrid(Object component, int gap) { - int count = 0; + int count = 0; // count of the visible subcomponents for (Object comp = get(component, ":comp"); comp != null; comp = get(comp, ":next")) { if (getBoolean(comp, "visible", true)) { count++; } } - if (count == 0) { return null; } + if (count == 0) { return null; } // zero subcomponent int columns = getInteger(component, "columns", 0); int icols = (columns != 0) ? columns : count; int irows = (columns != 0) ? ((count + columns - 1) / columns) : 1; @@ -1383,7 +1404,7 @@ ///dg.setClip(r.x, r.y, r.width, r.height); paint(g, clip.x, clip.y, clip.width, clip.height, content, isEnabled()); //System.out.println(System.currentTimeMillis() - time); - ///g.setClip(0, 0, getSize().width, getSize().height); + //g.setClip(0, 0, getSize().width, getSize().height); //g.setColor(Color.red); g.drawRect(clip.x, clip.y, clip.width - 1, clip.height - 1); } @@ -1617,38 +1638,33 @@ g.setClip(clipx, clipy, clipwidth, clipheight); //+clip } else if (("panel" == classname) || ("dialog" == classname)) { - if ("panel" == classname) { - boolean scrollable = getBoolean(component, "scrollable", false); - if (scrollable) { - paintScroll(component, classname, bounds, pressed, inside, focus, enabled, - g, clipx, clipy, clipwidth, clipheight); - return; - } - } - + int titleheight = getInteger(component, ":titleheight", 0); if ("dialog" == classname) { - int titleheight = getInteger(component, ":titleheight", 0); - paintRect(g, 0, 0, bounds.width, 3 + titleheight, + paintRect(g, 0, 0, bounds.width, 3 + titleheight, // dialog titlebar c_border, c_ctrl, true, true, false, true, true); paintRect(g, 0, 3 + titleheight, bounds.width, bounds.height - 3 - titleheight, - c_border, c_press, false, true, true, true, true); + c_border, c_press, false, true, true, true, true); // lower part excluding titlebar paintContent(component, g, clipx, clipy, clipwidth, clipheight, 3, 2, bounds.width - 6, titleheight, c_text, "left", false); - paintRect(g, 3, 3 + titleheight, bounds.width - 6, bounds.height - 6 - titleheight, + paintRect(g, 3, 3 + titleheight, bounds.width - 6, bounds.height - 6 - titleheight, // content area c_border, c_bg, true, true, true, true, true); - } else { - paintRect(g, 0, 0, bounds.width, bounds.height, - c_border, c_bg, false, false, false, false, true); + } else { // panel boolean border = getBoolean(component, "border", false); - if (border) { - g.setColor(enabled ? c_border : c_disable); - g.drawRect(0, 0, bounds.width - 1, bounds.height - 1); - } + paintRect(g, 0, titleheight / 2, bounds.width, bounds.height - (titleheight / 2), + enabled ? c_border : c_disable, c_bg, border, border, border, border, true); + paintContent(component, g, clipx, clipy, clipwidth, clipheight, // panel title + 3, 0, bounds.width - 6, titleheight, enabled ? c_text : c_disable, "left", false); } - for (Object comp = get(component, ":comp"); - comp != null; comp = get(comp, ":next")) { - paint(g, clipx, clipy, clipwidth, clipheight, comp, enabled); + if (get(component, ":port") != null) { + paintScroll(component, classname, bounds, pressed, inside, focus, enabled, + g, clipx, clipy, clipwidth, clipheight); + } + else { + for (Object comp = get(component, ":comp"); + comp != null; comp = get(comp, ":next")) { + paint(g, clipx, clipy, clipwidth, clipheight, comp, enabled); + } } } else if ("desktop" == classname) { @@ -1829,7 +1845,8 @@ else { String accelerator = getAccelerator(menu); if (accelerator != null) { - g.drawString(accelerator, tx + bounds.width - 10, r.y + 2 + 10); + g.drawString(accelerator, bounds.width - 4 - + getFontMetrics(font).stringWidth(accelerator), r.y + 2 + 10); } } } @@ -2006,8 +2023,11 @@ } } - paintRect(g, port.x - 1, port.y - 1, port.width + ((vertical == null) ? 2 : 1), port.height + ((horizontal == null) ? 2 : 1), - enabled ? c_border : c_disable, c_textbg, true, true, (horizontal == null), (vertical == null), true); + boolean hneed = (horizontal != null); boolean vneed = (vertical != null); + if (("panel" != classname) && ("dialog" != classname)) { + paintRect(g, port.x - 1, port.y - 1, port.width + (vneed ? 1 : 2), port.height + (hneed ? 1 : 2), + enabled ? c_border : c_disable, c_textbg, true, true, !hneed, !vneed, true); + } int x1 = Math.max(clipx, port.x); int x2 = Math.min(clipx + clipwidth, port.x + port.width); int y1 = Math.max(clipy, port.y); @@ -2086,7 +2106,7 @@ getBoolean(choice, "enabled", true) ? c_text : c_disable, "left", false); } } - else if ("panel" == classname) { + else if (("panel" == classname) || ("dialog" == classname)) { for (Object comp = get(component, ":comp"); comp != null; comp = get(comp, ":next")) { paint(g, clipx, clipy, clipwidth, clipheight, comp, enabled); @@ -2131,7 +2151,7 @@ itemenabled ? c_text : c_disable, "left", false); if ("tree" == classname) { int x = r.x - block / 2; int y = r.y + (r.height - 1) / 2; - g.setColor(itemenabled ? c_border : c_disable); + g.setColor(c_bg); g.drawLine(x, r.y, x, y); g.drawLine(x, y, r.x, y); if (subnode) { paintRect(g, x - 4, y - 4, 9, 9, itemenabled ? c_border : c_disable, @@ -3215,14 +3235,14 @@ Rectangle port = getRectangle(scrollpane, ":port"); Rectangle rl = (lead != null) ? getRectangle(lead, "bounds") : null; int vy = (keycode == KeyEvent.VK_PAGE_UP) ? - view.y : (view.y + port.height - 2); + view.y : (view.y + port.height); if ((keycode == KeyEvent.VK_PAGE_UP) && (rl != null) && (rl.y <= view.y)) { - vy -= port.height - 2; + vy -= port.height; } if ((keycode == KeyEvent.VK_PAGE_DOWN) && - (rl != null) && (rl.y + rl.height >= view.y + port.height - 2)) { - vy += port.height - 2; + (rl != null) && (rl.y + rl.height >= view.y + port.height)) { + vy += port.height; } for (Object item = get(component, ":comp"); item != null; item = getNextItem(component, item, recursive)) { @@ -3355,6 +3375,7 @@ private void handleMouseEvent(int x, int y, int clickcount, boolean shiftdown, boolean controldown, boolean popuptrigger, int id, Object component, Object part) { + //if (id == MouseEvent.MOUSE_ENTERED) { System.out.println("enter " + getClass(component)); } if (id == MouseEvent.MOUSE_ENTERED) { setTimer(750L); } @@ -3439,10 +3460,8 @@ processField(x, y, clickcount, id, component, part, true, false, 0); } } - else if ("panel" == classname) { // +desktop, dialog - if (getBoolean(component, "scrollable", false)) { - processScroll(x, y, id, component, part); - } + else if ("panel" == classname) { + processScroll(x, y, id, component, part); } else if ("desktop" == classname) { if (part == "modal") { @@ -3689,6 +3708,9 @@ } } } + else { + processScroll(x, y, id, component, part); + } } if (popuptrigger) {// && (id == MouseEvent.MOUSE_RELEASED)) { @@ -3701,13 +3723,22 @@ /** * Calculate the given point in a component relative to the thinlet desktop and - * set as reference value. + * set as reference value + * @param component a widget + * @param x reference point relative to the component left edge + * @param y relative to the top edge */ private void setReference(Object component, int x, int y) { referencex = x; referencey = y; for (; component != null; component = getParent(component)) { Rectangle bounds = getRectangle(component, "bounds"); referencex += bounds.x; referencey += bounds.y; + + Rectangle port = getRectangle(component, ":port"); + if (port != null) { // content scrolled + Rectangle view = getRectangle(component, ":view"); + referencex -= view.x - port.x; referencey -= view.y - port.y; + } } } @@ -3920,10 +3951,10 @@ else if (part == "corner") { part = "corner"; // compiler bug } - else { + else { //? if (id == MouseEvent.MOUSE_PRESSED) { Rectangle port = getRectangle(component, ":port"); - setReference(component, port.x, port.y); + if (port != null) { setReference(component, port.x, port.y); } } return false; } @@ -3955,6 +3986,7 @@ Math.min(dy, view.height - port.height - view.y); } else return false; + if ((dx == 0) && (dy == 0)) { return false; } view.x += dx; view.y += dy; repaint(component, null, (dx != 0) ? "horizontal" : "vertical"); return (((part == "left") || (part == "lefttrack")) && (view.x > 0)) || @@ -3977,7 +4009,7 @@ setString(component, "text", value, null); setInteger(component, "start", value.length(), 0); setInteger(component, "end", 0, 0); - repaint(component, "spinbox", null); + repaint(component, "spinbox", "text"); invoke(component, null, "action"); return true; } catch (NumberFormatException nfe) {} @@ -4102,8 +4134,12 @@ (y < 4 + getInteger(component, ":titleheight", 0))) { insidepart = "header"; } - else if (!getBoolean(component, "scrollable", false) || - !findScroll(component, x, y)) { + else if (!findScroll(component, x, y)) { + Rectangle port = getRectangle(component, ":port"); + if (port != null) { // content scrolled + Rectangle view = getRectangle(component, ":view"); + x += view.x - port.x; y += view.y - port.y; + } for (Object comp = get(component, ":comp"); comp != null; comp = get(comp, ":next")) { if (findComponent(comp, x, y)) { break; } @@ -4168,14 +4204,14 @@ /** * @param component a scrollable widget - * @param x - * @param y + * @param x point x location + * @param y point y location * @return true if the point (x, y) is inside scroll-control area - * (scrollbars, corners, borders), false otherwise (vievport, header) + * (scrollbars, corners, borders), false otherwise (vievport, header, or no scrollpane) */ private boolean findScroll(Object component, int x, int y) { Rectangle port = getRectangle(component, ":port"); - if (port.contains(x, y)) { return false; } + if ((port == null) || port.contains(x, y)) { return false; } Rectangle view = getRectangle(component, ":view"); Rectangle horizontal = getRectangle(component, ":horizontal"); Rectangle vertical = getRectangle(component, ":vertical"); @@ -4216,58 +4252,63 @@ */ private void repaint(Object component, Object classname, Object part) { Rectangle b = getRectangle(component, "bounds"); - if ((classname == "combobox") || (classname == "spinbox")) { - boolean down = (part == "up") || (part == "down"); // else text - repaint(component, down ? (b.x + b.width - block) : b.x, b.y, - down ? block : (b.width - block), b.height); + if (classname == "combobox") { // combobox down arrow + repaint(component, b.x + b.width - block, b.y, block, b.height); // icon?+ + } + else if (classname == "spinbox") { + if (part == "text") { // spinbox textfield content + repaint(component, b.x, b.y, b.width - block, b.height); + } + else { // spinbox increase or decrease button + repaint(component, b.x + b.width - block, + (part == "up") ? b.y : (b.y + b.height - b.height / 2), block, b.height / 2); + } } //else if (classname == "dialog") {} //int titleheight = getInteger(component, ":titleheight", 0); //else if (classname == "splitpane") {} - else if ((classname == "tabbedpane") || - (classname == "menubar") || (classname == ":popup")) { + else if ((classname == "tabbedpane") || // tab + (classname == "menubar") || (classname == ":popup")) { // menuitem Rectangle r = getRectangle(part, "bounds"); repaint(component, b.x + r.x, b.y + r.y, (classname == ":popup") ? b.width : r.width, r.height); } - else { //if ((classname == ":combolist") || (classname == "textarea") || - //(classname == "list") || (classname == "table") || (classname == "tree")) { - Rectangle port = getRectangle(component, ":port"); - if (part == "left") { - repaint(component, b.x + port.x, b.y + b.height - block, block, block); - } - else if (part == "right") { - repaint(component, b.x + port.x + port.width - block, b.y + b.height - block, block, block); - } - else if (part == "up") { - repaint(component, b.x + b.width - block, b.y + port.y, block, block); - } - else if (part == "down") { - repaint(component, b.x + b.width - block, b.y + port.y + port.height - block, block, block); - } - else if (part == "horizontal") { // horizontaly center part - repaint(component, b.x + port.x, b.y, port.width, b.height); + // classname: ":combolist" "textarea" "list" "table" "tree" + else if ((part == "left") || (part == "right")) { // horizontal scrollbar button + Rectangle r = getRectangle(component, ":horizontal"); + repaint(component, b.x + ((part == "left") ? r.x : (r.x + r.width - block)), b.y + r.y, block, r.height); + } + else if ((part == "up") || (part == "down")) { // vertical scrollbar button + Rectangle r = getRectangle(component, ":vertical"); + repaint(component, b.x + r.x, b.y + ((part == "up") ? r.y : (r.y + r.height - block)), r.width, block); + } + else if ((part == "text") || (part == "horizontal") || (part == "vertical")) { + Rectangle port = getRectangle(component, ":port"); // textarea or content + repaint(component, b.x + port.x, b.y + port.y, port.width, port.height); + if (part == "horizontal") { + Rectangle r = getRectangle(component, ":horizontal"); + repaint(component, b.x + r.x, b.y + r.y, r.width, r.height); } else if (part == "vertical") { - repaint(component, b.x, b.y + port.y, b.width, port.height); - } - else if (part == "text") { //textarea - repaint(component, b.x + port.x, b.y + port.y, port.width, port.height); + Rectangle r = getRectangle(component, ":vertical"); + repaint(component, b.x + r.x, b.y + r.y, r.width, r.height); } - else { // repaint the whole line of its subcomponent - Rectangle view = getRectangle(component, ":view"); - Rectangle r = getRectangle(part, "bounds"); - if ((r.y + r.height >= view.y) && (r.y <= view.y + port.height)) { - repaint(component, b.x + port.x, b.y + port.y - view.y + r.y, - port.width, r.height); - //? need cut item rectangle above/bellow viewport - } + } + else { // repaint the whole line of its subcomponent + Rectangle port = getRectangle(component, ":port"); + Rectangle view = getRectangle(component, ":view"); + Rectangle r = getRectangle(part, "bounds"); + if ((r.y + r.height >= view.y) && (r.y <= view.y + port.height)) { + repaint(component, b.x + port.x, b.y + port.y - view.y + r.y, + port.width, r.height); + //? need cut item rectangle above/bellow viewport } } } /** - * + * Layout and paint the given component later + * @param component */ private void validate(Object component) { repaint(component); @@ -4276,7 +4317,8 @@ } /** - * + * Repaint the given component's area later + * @param component */ private void repaint(Object component) { Rectangle bounds = getRectangle(component, "bounds"); @@ -4286,13 +4328,22 @@ } /** - * + * Repaint the given component's area later + * @param component + * @param x + * @param y + * @param width + * @param height */ private void repaint(Object component, int x, int y, int width, int height) { while ((component = getParent(component)) != null) { Rectangle bounds = getRectangle(component, "bounds"); - x += bounds.x; - y += bounds.y; + x += bounds.x; y += bounds.y; + Rectangle view = getRectangle(component, ":view"); + if (view != null) { + Rectangle port = getRectangle(component, ":port"); + x += -view.x + port.x; y += -view.y + port.y; //+ clip :port + } } repaint(x, y, width, height); } Index: Widget.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Widget.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Widget.java 19 Mar 2003 23:36:51 -0000 1.6 +++ Widget.java 24 Mar 2003 19:46:41 -0000 1.7 @@ -17,6 +17,13 @@ widget = Thinlet.create(classname); } +<<<<<<< Widget.java + public String getClassName() { + return null; + } + +======= +>>>>>>> 1.6 /** * */ |
From: Brad C. <bk...@mu...> - 2003-03-20 22:34:41
|
What's up? cvs server: Updating . cvs server: warning: Thinlet.java is not (any longer) pertinent -- Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax http://www.wecanstopspam.org/ AOL-IM: BKClements |
From: <ab...@us...> - 2003-03-19 23:36:54
|
Update of /cvsroot/thinlet/thinlet/src/thinlet In directory sc8-pr-cvs1:/tmp/cvs-serv23028 Modified Files: Widget.java Log Message: Remove getClass() Index: Widget.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/src/thinlet/Widget.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Widget.java 10 Mar 2003 21:29:30 -0000 1.5 +++ Widget.java 19 Mar 2003 23:36:51 -0000 1.6 @@ -17,10 +17,6 @@ widget = Thinlet.create(classname); } - public String getClass() { - return null; - } - /** * */ |
From: Andrzej B. <ab...@ge...> - 2003-03-17 23:13:21
|
Hi, Please note that the structure of CVS has been changed. New directories have been created, as explained in my last email: * thinlet/www - web site pages * thinlet/doc - documentation * thinlet/contrib - contributed stuff * thinlet/src - new home for thinlet sources We welcome new contributions to each of these areas! With the help of SF staff I also made a CVS repo-copy of Thinlet.java and Widget.java files, so that their history is preserved in the new location. In the case of the other source files I thought it was less important, so a simple check-in of latest copies into new places should be ok. Any comments so far? If I don't hear any screaming, I will move the rest of the sources to thinlet/src, and then when the move is complete, I'm going to delete them from their previous places - so that all core sources are put under thinlet/src. Please voice your concerns or opinions before that happens. Thank you! -- Best regards, Andrzej Bialecki ------------------------------------------------- Software Architect, System Integration Specialist CEN/ISSS EC Workshop, ECIMF project chair EU FP6 E-Commerce Expert/Evaluator ------------------------------------------------- FreeBSD developer (http://www.freebsd.org) |
From: <ab...@us...> - 2003-03-16 11:49:02
|
Update of /cvsroot/thinlet/thinlet/src/thinlet In directory sc8-pr-cvs1:/tmp/cvs-serv26541/thinlet Log Message: Directory /cvsroot/thinlet/thinlet/src/thinlet added to the repository |
From: <ab...@us...> - 2003-03-16 11:48:26
|
Update of /cvsroot/thinlet/thinlet/src In directory sc8-pr-cvs1:/tmp/cvs-serv26365/src Log Message: Directory /cvsroot/thinlet/thinlet/src added to the repository |
From: <ab...@us...> - 2003-03-16 11:47:55
|
Update of /cvsroot/thinlet/thinlet/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv26210/contrib Log Message: Directory /cvsroot/thinlet/thinlet/contrib added to the repository |
From: <ab...@us...> - 2003-03-16 11:47:23
|
Update of /cvsroot/thinlet/thinlet/www In directory sc8-pr-cvs1:/tmp/cvs-serv26041/www Log Message: Directory /cvsroot/thinlet/thinlet/www added to the repository |
From: <ab...@us...> - 2003-03-16 11:46:45
|
Update of /cvsroot/thinlet/thinlet/doc In directory sc8-pr-cvs1:/tmp/cvs-serv25821/doc Log Message: Directory /cvsroot/thinlet/thinlet/doc added to the repository |
From: <ba...@us...> - 2003-03-15 13:21:50
|
Update of /cvsroot/thinlet/thinlet In directory sc8-pr-cvs1:/tmp/cvs-serv17764 Added Files: ThinletConstants.java Log Message: no message --- NEW FILE: ThinletConstants.java --- package thinlet; public interface ThinletConstants { String NAME = "name"; String ENABLED = "enabled"; String VISIBLE = "visible"; String TOOLTIP = "tooltip"; String FONT = "font"; String FOREGROUND = "foreground"; String BACKGROUND = "background"; String WIDTH = "width"; String HEIGHT = "height"; String COLSPAN = "colspan"; String ROWSPAN = "rowspan"; String WEIGHTX = "weightx"; String WEIGHTY = "weighty"; String HALIGN = "halign"; String VALIGN = "valign"; String PROPERTY = "property"; String INIT = "init"; String LABEL = "label"; String TEXT = "text"; String ICON = "icon"; String ALIGNMENT = "alignment"; String MNEMONIC = "mnemonic"; String FOR = "for"; String BUTTON = "button"; String ACTION = "action"; String TYPE = "type"; String CHECKBOX = "checkbox"; String SELECTED = "selected"; String GROUP = "group"; String TOGGLEBUTTON = "togglebutton"; String COMBOBOX = "combobox"; String CHOICE = "choice"; String TEXTFIELD = "textfield"; String COLUMNS = "columns"; String EDITABLE = "editable"; String START = "start"; String END = "end"; String INSERT = "insert"; String REMOVE = "remove"; String CARET = "caret"; String PERFORM = "perform"; String PASSWORDFIELD = "passwordfield"; String TEXTAREA = "textarea"; String ROWS = "rows"; String WRAP = "wrap"; String TABBEDPANE = "tabbedpane"; String PLACEMENT = "placement"; String TAB = "tab"; String PANEL = "panel"; String TOP = "top"; String LEFT = "left"; String BOTTOM = "bottom"; String RIGHT = "right"; String GAP = "gap"; String BORDER = "border"; String SCROLLABLE = "scrollable"; String DESKTOP = "desktop"; String DIALOG = "dialog"; String MODAL = "modal"; String SPINBOX = "spinbox"; String PROGRESSBAR = "progressbar"; String ORIENTATION = "orientation"; String MINIMUM = "minimum"; String MAXIMUM = "maximum"; String VALUE = "value"; String SLIDER = "slider"; String UNIT = "unit"; String BLOCK = "block"; String SPLITPANE = "splitpane"; String DIVIDER = "divider"; String LIST = "list"; String SELECTION = "selection"; String LINE = "line"; String ITEM = "item"; String TABLE = "table"; String HEADER = "header"; String COLUMN = "column"; String SORT = "sort"; String ROW = "row"; String CELL = "cell"; String TREE = "tree"; String EXPAND = "expand"; String COLLAPSE = "collapse"; String NODE = "node"; String EXPANDED = "expanded"; String SEPARATOR = "separator"; String MENUBAR = "menubar"; String MENU = "menu"; String MENUITEM = "menuitem"; String ACCELERATOR = "accelerator"; String CHECKBOXMENUITEM = "checkboxmenuitem"; String POPUPMENU = "popupmenu"; String BEAN = "bean"; } |
From: Ed R. <er...@te...> - 2003-03-13 20:37:54
|
I like moving things to src/ However: 1 - Some items might want to be part of the thinlet package - for example dialog. If we don't put these as part of the thinlet package now, it could be messy in the future. 2 - I think contrib should be under source, as this will contain source so what about a directory structure like: - thinlet/doc: documentation (other than javadoc) - thinlet/www: web site - thinlet/src: core Thinlet source - thinlet/src/contrib: contributed stuff, useful widgets, -----Original Message----- From: Andrzej Bialecki [mailto:ab...@ge...] Sent: Thursday, March 13, 2003 3:27 PM To: thi...@li... Subject: Rearrangements in CVS needed Hi, I started working on adding docs, contrib and WWW modules to CVS. However, the structure of CVS as it is right now is a bit messy... First, we have the top level module, which we check out as thinlet/. Well, fine, but you can only have one top level, i.e. I can't create other modules on the same level. Which means that I have to put doc/ under thinlet/. However, thinlet/ serves also as a package name right now, and if I make thinlet/doc one could think that it contains Java sources as well... Messy. And it will become even worse when we start adding other stuff, like web site content, docs, FAQs and whatnot... So, I propose the following: * create 4 modules, located in subdirectories of thinlet/: - thinlet/doc: documentation (other than javadoc) - thinlet/www: web site - thinlet/contrib: contributed stuff, useful widgets, as well as a playground for things not yet integrated into core - thinlet/src: core Thinlet source * move Thinlet.java to thinlet/src/thinlet/Thinlet.java . Hopefully, this can be accomplished while preserving the file history... * move stuff from midp/ to thinlet/src/thinlet/midp/ * move stuff from drafts/ to contrib/ * move amazon/ and common/ to demo/ The first three modules (doc, www, contrib) can be created even now - I don't think it's a contentious issue - so unless I hear otherwise I will create them tomorrow afternoon CET. I'd like to hear some arguments however before I move stuff to src/ - this significantly changes the layout of CVS... BTW: the src, doc, www, demo and contrib will become new module names, so that one will be able to checkout only portion of CVS, as needed... -- Best regards, Andrzej Bialecki ------------------------------------------------- Software Architect, System Integration Specialist CEN/ISSS EC Workshop, ECIMF project chair EU FP6 E-Commerce Expert/Evaluator ------------------------------------------------- FreeBSD developer (http://www.freebsd.org) This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. |
From: Andrzej B. <ab...@ge...> - 2003-03-13 20:28:36
|
Hi, I started working on adding docs, contrib and WWW modules to CVS. However, the structure of CVS as it is right now is a bit messy... First, we have the top level module, which we check out as thinlet/. Well, fine, but you can only have one top level, i.e. I can't create other modules on the same level. Which means that I have to put doc/ under thinlet/. However, thinlet/ serves also as a package name right now, and if I make thinlet/doc one could think that it contains Java sources as well... Messy. And it will become even worse when we start adding other stuff, like web site content, docs, FAQs and whatnot... So, I propose the following: * create 4 modules, located in subdirectories of thinlet/: - thinlet/doc: documentation (other than javadoc) - thinlet/www: web site - thinlet/contrib: contributed stuff, useful widgets, as well as a playground for things not yet integrated into core - thinlet/src: core Thinlet source * move Thinlet.java to thinlet/src/thinlet/Thinlet.java . Hopefully, this can be accomplished while preserving the file history... * move stuff from midp/ to thinlet/src/thinlet/midp/ * move stuff from drafts/ to contrib/ * move amazon/ and common/ to demo/ The first three modules (doc, www, contrib) can be created even now - I don't think it's a contentious issue - so unless I hear otherwise I will create them tomorrow afternoon CET. I'd like to hear some arguments however before I move stuff to src/ - this significantly changes the layout of CVS... BTW: the src, doc, www, demo and contrib will become new module names, so that one will be able to checkout only portion of CVS, as needed... -- Best regards, Andrzej Bialecki ------------------------------------------------- Software Architect, System Integration Specialist CEN/ISSS EC Workshop, ECIMF project chair EU FP6 E-Commerce Expert/Evaluator ------------------------------------------------- FreeBSD developer (http://www.freebsd.org) |
From: Andrzej B. <ab...@ge...> - 2003-03-13 17:38:00
|
Frank Burough wrote: > Hi-- > > I am attempting to get the latest thinlet software via CVS from > sourceforge. I have attempted to login following the instructions on > sourceforge (this works with other projects...) and I am not successful > logging in. > > Any thoughts? > > Here is what I entered (I left the CVS password blank as per sourceforge > instructions): > > [fburough@fburough thinlet]$ cvs > -d:pserver:ano...@cv...:/cvsroot/thinlet login > Logging in to :pserver:ano...@cv... > <mailto:ano...@cv...>:2401/cvsroot/thinlet > CVS password: > cvs [login aborted]: end of file from server (consult above messages if any) When asked for CVS password, you should simply type enter - I suppose that's what you did, right? You may want to try it with -t to see some additional messages. Actually, I don't remember issuing specifically the "login" command, I just did "checkout thinlet" I just tried it again, and It Works for Me (tm). Please be advised that the latest working revision of Thinlet.java is r1.6 - we're trying to fix it... -- -- Best regards, Andrzej Bialecki ------------------------------------------------- Software Architect, System Integration Specialist CEN/ISSS EC Workshop, ECIMF project chair EU FP6 E-Commerce Expert/Evaluator ------------------------------------------------- FreeBSD developer (http://www.freebsd.org) |
From: Frank B. <fbu...@el...> - 2003-03-13 16:36:27
|
Hi-- I am attempting to get the latest thinlet software via CVS from sourceforge. I have attempted to login following the instructions on sourceforge (this works with other projects...) and I am not successful logging in. Any thoughts? Here is what I entered (I left the CVS password blank as per sourceforge instructions): [fburough@fburough thinlet]$ cvs -d:pserver:ano...@cv...:/cvsroot/thinlet login Logging in to :pserver:ano...@cv...:2401/cvsroot/thinlet CVS password: cvs [login aborted]: end of file from server (consult above messages if any) Thanks for your help, Frank |
From: <ba...@us...> - 2003-03-10 21:29:35
|
Update of /cvsroot/thinlet/thinlet In directory sc8-pr-cvs1:/tmp/cvs-serv17406 Modified Files: Widget.java Thinlet.java Log Message: no message Index: Widget.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/Widget.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Widget.java 7 Mar 2003 18:35:13 -0000 1.4 --- Widget.java 10 Mar 2003 21:29:30 -0000 1.5 *************** *** 18,21 **** --- 18,25 ---- } + public String getClass() { + return null; + } + /** * Index: Thinlet.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/Thinlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Thinlet.java 2 Mar 2003 17:14:34 -0000 1.7 --- Thinlet.java 10 Mar 2003 21:29:30 -0000 1.8 *************** *** 274,293 **** int gap = getInteger(component, "gap", 0); int[][] grid = getGrid(component, gap); ! if (grid != null) { ! int top = getInteger(component, "top", 0); ! int left = getInteger(component, "left", 0); int bottom = getInteger(component, "bottom", 0); int right = getInteger(component, "right", 0); ! if (classname == "dialog") { ! int titleheight = getSize(component, 0, 0).height; ! setInteger(component, ":titleheight", titleheight, 0); ! top += 4 + titleheight; left += 4; bottom += 4; right += 4; } ! Rectangle bounds = getRectangle(component, "bounds"); ! int wsum = left + getSum(grid[0], 0, grid[0].length, gap, false) + right; ! int hsum = top + getSum(grid[1], 0, grid[1].length, gap, false) + bottom; for (int i = 0; i < 2; i++) { // i=0: horizontal, i=1: vertical ! int d = ((i == 0) ? (bounds.width - wsum) : (bounds.height - hsum)); if (d != 0) { //+ > 0 int w = getSum(grid[2 + i], 0, grid[2 + i].length, 0, false); --- 274,330 ---- int gap = getInteger(component, "gap", 0); int[][] grid = getGrid(component, gap); ! int top = 0; int left = 0; ! int contentwidth = 0; int contentheight = 0; ! if (grid != null) { // has subcomponents ! top = getInteger(component, "top", 0); ! left = getInteger(component, "left", 0); int bottom = getInteger(component, "bottom", 0); int right = getInteger(component, "right", 0); ! // sums the preferred size of cell widths and heights, gaps ! contentwidth = left + getSum(grid[0], 0, grid[0].length, gap, false) + right; ! contentheight = top + getSum(grid[1], 0, grid[1].length, gap, false) + bottom; ! } ! ! Dimension title = getSize(component, 0, 0); // title text and icon ! boolean scrollable = getBoolean(component, "scrollable", false); ! boolean border = ("panel" == classname) && getBoolean(component, "border", false); ! int iborder = (border ? 1 : 0); ! if (scrollable) { // set scrollpane areas ! if ("panel" == classname) { ! int head = title.height / 2; ! int headgap = (title.height > 0) ? (title.height - head - iborder) : 0; ! scrollable = layoutScroll(component, contentwidth, contentheight, ! head, 0, 0, 0, border, headgap); } ! else { // dialog ! scrollable = layoutScroll(component, contentwidth, contentheight, ! 3 + title.height, 3, 3, 3, true, 0); ! } ! } ! ! int areax = 0; int areay = 0; int areawidth = 0; int areaheight = 0; ! if (scrollable) { ! // components are relative to the viewport ! Rectangle port = getRectangle(component, ":port"); ! areawidth = port.width; areaheight = port.height; ! } ! else { // scrollpane isn't required ! // components are relative to top/left corner Rectangle bounds = getRectangle(component, "bounds"); ! areawidth = bounds.width; areaheight = bounds.height; ! if ("panel" == classname) { ! areax = iborder; areay = Math.max(iborder, title.height); ! areawidth -= 2 * iborder; areaheight -= areay - iborder; ! } ! else { // dialog ! areax = 4; areay = 4 + title.height; ! areawidth -= 8; areaheight -= areay + 4; ! } ! } ! ! if (grid != null) { for (int i = 0; i < 2; i++) { // i=0: horizontal, i=1: vertical ! // remaining space ! int d = ((i == 0) ? (areawidth - contentwidth) : (areaheight - contentheight)); if (d != 0) { //+ > 0 int w = getSum(grid[2 + i], 0, grid[2 + i].length, 0, false); *************** *** 301,311 **** } } ! int i = 0; for (Object comp = get(component, ":comp"); comp != null; comp = get(comp, ":next")) { if (!getBoolean(comp, "visible", true)) { continue; } ! int ix = left + getSum(grid[0], 0, grid[4][i], gap, true); ! int iy = top + getSum(grid[1], 0, grid[5][i], gap, true); int iwidth = getSum(grid[0], grid[4][i], grid[6][i], gap, false); int iheight = getSum(grid[1], grid[5][i], grid[7][i], gap, false); --- 338,348 ---- } } ! int i = 0; for (Object comp = get(component, ":comp"); comp != null; comp = get(comp, ":next")) { if (!getBoolean(comp, "visible", true)) { continue; } ! int ix = areax + left + getSum(grid[0], 0, grid[4][i], gap, true); ! int iy = areay + top + getSum(grid[1], 0, grid[5][i], gap, true); int iwidth = getSum(grid[0], grid[4][i], grid[6][i], gap, false); int iheight = getSum(grid[1], grid[5][i], grid[7][i], gap, false); *************** *** 331,338 **** i++; } - - if (getBoolean(component, "scrollable", false)) { - layoutScroll(component, wsum, hsum, 0, 0, 0, 0, false, 0); - } } } --- 368,371 ---- *************** *** 871,882 **** * @param contentwidth preferred component width * @param contentheight preferred component height ! * @param header column height ! * @param topborder border size on the top (1 or 0) ! * @param border define left, bottom, and right border width (1 or 0) * * list: 0, 0, 0, 0, true, 0 | table: header, ... | dialog: header, 3, 3, 3, true, 0 * title-border panel: header / 2, 0, 0, 0, true, head */ ! private void layoutScroll(Object component, int contentwidth, int contentheight, int top, int left, int bottom, int right, boolean border, int topgap) { --- 904,918 ---- * @param contentwidth preferred component width * @param contentheight preferred component height ! * @param top top inset (e.g. table header, dialog title, half of panel title) ! * @param left left inset (e.g. dialog border) ! * @param bottom bottom inset (e.g. dialog border) ! * @param right right inset (e.g. dialog border) ! * @param topgap (lower half of panel title) ! * @return true if scrollpane is required, otherwise false * * list: 0, 0, 0, 0, true, 0 | table: header, ... | dialog: header, 3, 3, 3, true, 0 * title-border panel: header / 2, 0, 0, 0, true, head */ ! private boolean layoutScroll(Object component, int contentwidth, int contentheight, int top, int left, int bottom, int right, boolean border, int topgap) { *************** *** 910,913 **** --- 946,950 ---- } setRectangle(component, ":view", viewx, viewy, contentwidth, contentheight); + return vneed || hneed; } *************** *** 1020,1033 **** } if (("panel" == classname) || (classname == "dialog")) { ! Dimension size = new Dimension( ! getInteger(component, "left", 0) + getInteger(component, "right", 0), ! getInteger(component, "top", 0) + getInteger(component, "bottom", 0)); if (classname == "dialog") { ! int titleheight = getSize(component, 0, 0).height; ! size.width += 8; size.height += 8 + titleheight; } int gap = getInteger(component, "gap", 0); int[][] grid = getGrid(component, gap); ! if (grid != null) { size.width += getSum(grid[0], 0, grid[0].length, gap, false); size.height += getSum(grid[1], 0, grid[1].length, gap, false); --- 1057,1076 ---- } if (("panel" == classname) || (classname == "dialog")) { ! // title text and icon height ! Dimension size = getSize(component, 0, 0); ! // add border size if (classname == "dialog") { ! size.width = 8; size.height += 8; // title width neglected } + else if (getBoolean(component, "border", false)) { // bordered panel + size.width = 2; size.height += (size.height > 0) ? 1 : 2; // title includes line + } + // add paddings + size.width = getInteger(component, "left", 0) + getInteger(component, "right", 0); + size.height += getInteger(component, "top", 0) + getInteger(component, "bottom", 0); + // add content preferred size int gap = getInteger(component, "gap", 0); int[][] grid = getGrid(component, gap); ! if (grid != null) { // has components size.width += getSum(grid[0], 0, grid[0].length, gap, false); size.height += getSum(grid[1], 0, grid[1].length, gap, false); *************** *** 2082,2099 **** g.drawLine(0, r.y + r.height, viewwidth, r.y + r.height); } ! boolean itemenabled = enabled && getBoolean(item, "enabled", true); ! paintContent(item, g, clipx, clipy, clipwidth, clipheight, ! r.x + ITEM.left, r.y + ITEM.top, viewwidth - ITEM.left - ITEM.right, r.height - ITEM.top - ITEM.bottom, ! itemenabled ? c_text : c_disable, "left", false); ! if ("tree" == classname) { ! int x = r.x - block / 2; int y = r.y + (r.height - 1) / 2; ! g.setColor(itemenabled ? c_border : c_disable); ! g.drawLine(x, r.y, x, y); g.drawLine(x, y, r.x, y); ! if (subnode) { ! paintRect(g, x - 4, y - 4, 9, 9, itemenabled ? c_border : c_disable, ! itemenabled ? c_ctrl : c_bg, true, true, true, true, true); ! g.setColor(itemenabled ? c_text : c_disable); ! g.drawLine(x - 2, y, x + 2, y); ! if (!expanded) { g.drawLine(x, y - 2, x, y + 2); } } } --- 2125,2158 ---- g.drawLine(0, r.y + r.height, viewwidth, r.y + r.height); } ! if ("table" != classname) { ! boolean itemenabled = enabled && getBoolean(item, "enabled", true); ! paintContent(item, g, clipx, clipy, clipwidth, clipheight, ! r.x + ITEM.left, r.y + ITEM.top, viewwidth - ITEM.left - ITEM.right, r.height - ITEM.top - ITEM.bottom, ! itemenabled ? c_text : c_disable, "left", false); ! if ("tree" == classname) { ! int x = r.x - block / 2; int y = r.y + (r.height - 1) / 2; ! g.setColor(itemenabled ? c_border : c_disable); ! g.drawLine(x, r.y, x, y); g.drawLine(x, y, r.x, y); ! if (subnode) { ! paintRect(g, x - 4, y - 4, 9, 9, itemenabled ? c_border : c_disable, ! itemenabled ? c_ctrl : c_bg, true, true, true, true, true); ! g.setColor(itemenabled ? c_text : c_disable); ! g.drawLine(x - 2, y, x + 2, y); ! if (!expanded) { g.drawLine(x, y - 2, x, y + 2); } ! } ! } ! } ! else { // tree ! int x = 0; ! for (Object cell = get(item, ":comp"); cell != null; cell = get(cell, ":next")) { ! if (clipx + clipwidth <= x) { break; } ! int iwidth = 80; ! if (clipx < x + iwidth) { ! boolean cellenabled = enabled && getBoolean(cell, "enabled", true); ! paintContent(cell, g, clipx, clipy, clipwidth, clipheight, ! r.x + x + 1, r.y + 1, iwidth - 2, r.height - 3, ! cellenabled ? c_text : c_disable, "left", false); ! } ! x += iwidth; } } |