Skip to content

Commit fa98105

Browse files
author
jossonsmith
committed
Re-design Tree widget. Now Tree looks much more native.
1 parent 72fc868 commit fa98105

File tree

10 files changed

+1328
-659
lines changed

10 files changed

+1328
-659
lines changed

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Shell.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.eclipse.swt.graphics.Point;
1919
import org.eclipse.swt.graphics.Rectangle;
2020
import org.eclipse.swt.graphics.Region;
21-
import org.eclipse.swt.internal.xhtml.Element;
2221

2322

2423
/**

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Table.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
margin:0;
1313
border-collapse:collapse;
1414
}
15-
table-v-scroll {
15+
.table-v-scroll {
1616
overflow:scroll;
1717
overflow-x:hidden;
1818
}
19-
table-h-scroll {
19+
.table-h-scroll {
2020
overflow:scroll;
2121
overflow-y:hidden;
2222
}
@@ -86,6 +86,14 @@ thead .table-head-text {
8686
min-height:13px;
8787
_height:1em;
8888
}
89+
@media all and (min-width:0px){/* opera */
90+
.table-check-box {
91+
top:50%;
92+
margin-top:-8px;
93+
left:-16px !important;
94+
}
95+
}
96+
8997
.table-text {
9098
min-height:16px;
9199
height:100%;

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Table.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -768,21 +768,10 @@ protected void createHandle () {
768768
}
769769
tableHandle.className = cssTable;
770770
handle.appendChild(tableHandle);
771-
if (parent != null) {
772-
Element parentHandle = parent.containerHandle();
773-
if (parentHandle!= null) {
774-
parentHandle.appendChild(handle);
775-
}
776-
}
777771
handle.onkeydown = new RunnableCompatibility() {
778772
public void run() {
779773
HTMLEvent evt = (HTMLEvent) getEvent();
780774
int index = focusIndex;
781-
// if(index < 0){
782-
// index = 0;
783-
// }
784-
// System.out.println("on key down !" + evt.keyCode + " index "
785-
// + index);
786775
switch(evt.keyCode){
787776
case 13:
788777
TableItem item = getItem(index);
@@ -833,8 +822,6 @@ public void run() {
833822
}
834823
}
835824
};
836-
837-
838825
}
839826

840827
//void setCursorFocus(int index){

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/TableItem.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,25 +1341,8 @@ public void setText (int index, String string) {
13411341
}
13421342
void showSelection(boolean selected) {
13431343
this.selected = selected;
1344-
int index = 0;
1345-
if ((parent.style & SWT.CHECK) != 0) {
1346-
index++;
1347-
}
13481344
OS.updateCSSClass(handle, "table-item-selected", selected);
13491345
}
1350-
1351-
// void setSelected(boolean selected){
1352-
// this.selected = selected;
1353-
// System.out.print("selected " + selected);
1354-
// if(selected){
1355-
//
1356-
// this.handle.className = "table-item-selected";
1357-
// }else{
1358-
// this.handle.className = "table-item-default";
1359-
// }
1360-
// System.out.print("selected handle " + this.handle.className );
1361-
// }
1362-
13631346
boolean isSelected(){
13641347
return this.selected;
13651348
}

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Text.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.eclipse.swt.internal.xhtml.Element;
2626
import org.eclipse.swt.internal.xhtml.HTMLEvent;
2727
import org.eclipse.swt.internal.xhtml.document;
28-
import org.eclipse.swt.internal.xhtml.window;
2928

3029
/**
3130
* Instances of this class are selectable user interface

0 commit comments

Comments
 (0)