Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CometeSWT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Software Control System
Libraries
java
CometeSWT
Commits
3ac17f22
Commit
3ac17f22
authored
Oct 28, 2014
by
Katy Saintin
Browse files
Options
Downloads
Patches
Plain Diff
Tree compatibility
parent
dc7df032
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/fr/soleil/comete/swt/ScrollPane.java
+39
-0
39 additions, 0 deletions
src/main/java/fr/soleil/comete/swt/ScrollPane.java
src/main/java/fr/soleil/comete/swt/Tree.java
+16
-0
16 additions, 0 deletions
src/main/java/fr/soleil/comete/swt/Tree.java
with
55 additions
and
0 deletions
src/main/java/fr/soleil/comete/swt/ScrollPane.java
0 → 100644
+
39
−
0
View file @
3ac17f22
package
fr.soleil.comete.swt
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.custom.ScrolledComposite
;
import
org.eclipse.swt.widgets.Composite
;
import
fr.soleil.comete.definition.widget.IComponent
;
import
fr.soleil.comete.definition.widget.IScrollPane
;
public
class
ScrollPane
extends
CometeComposite
<
ScrolledComposite
>
implements
IScrollPane
{
public
ScrollPane
(
Composite
parent
,
int
childStyle
)
{
super
(
parent
,
childStyle
);
}
@Override
protected
ScrolledComposite
initControl
(
int
childStyle
)
{
return
new
ScrolledComposite
(
this
,
SWT
.
H_SCROLL
|
SWT
.
V_SCROLL
);
}
@Override
public
void
setHorizontalAlignment
(
int
halign
)
{
// Nothing to do
}
@Override
public
int
getHorizontalAlignment
()
{
return
0
;
}
@Override
public
void
setView
(
IComponent
component
)
{
// Nothing to do in SWT composite constructor always need parent
}
}
This diff is collapsed.
Click to expand it.
src/main/java/fr/soleil/comete/swt/Tree.java
+
16
−
0
View file @
3ac17f22
...
@@ -57,6 +57,8 @@ public class Tree extends CometeComposite<org.eclipse.swt.widgets.Tree> implemen
...
@@ -57,6 +57,8 @@ public class Tree extends CometeComposite<org.eclipse.swt.widgets.Tree> implemen
protected
ITreeNode
rootNode
;
protected
ITreeNode
rootNode
;
protected
int
selectionMode
=
ITree
.
MULTI_SELECTION
;
/**
/**
* Default constructor
* Default constructor
*/
*/
...
@@ -67,6 +69,7 @@ public class Tree extends CometeComposite<org.eclipse.swt.widgets.Tree> implemen
...
@@ -67,6 +69,7 @@ public class Tree extends CometeComposite<org.eclipse.swt.widgets.Tree> implemen
public
Tree
(
Composite
parent
,
int
selectionType
,
int
childStyle
)
{
public
Tree
(
Composite
parent
,
int
selectionType
,
int
childStyle
)
{
super
(
parent
,
selectionType
|
childStyle
);
super
(
parent
,
selectionType
|
childStyle
);
setSelectionMode
(
selectionType
);
selectionListeners
=
new
ArrayList
<
WeakReference
<
ITreeNodeSelectionListener
>>();
selectionListeners
=
new
ArrayList
<
WeakReference
<
ITreeNodeSelectionListener
>>();
}
}
...
@@ -371,6 +374,18 @@ public class Tree extends CometeComposite<org.eclipse.swt.widgets.Tree> implemen
...
@@ -371,6 +374,18 @@ public class Tree extends CometeComposite<org.eclipse.swt.widgets.Tree> implemen
return
0
;
return
0
;
}
}
@Override
public
void
setSelectionMode
(
int
selectionMode
)
{
// In SWT the selection mode is set at construction
this
.
selectionMode
=
selectionMode
;
}
@Override
public
int
getSelectionMode
()
{
// In SWT the selection mode is set at construction
return
selectionMode
;
}
public
static
void
main
(
final
String
[]
args
)
{
public
static
void
main
(
final
String
[]
args
)
{
final
Display
display
=
new
Display
();
final
Display
display
=
new
Display
();
final
Shell
shell
=
new
Shell
(
display
);
final
Shell
shell
=
new
Shell
(
display
);
...
@@ -437,4 +452,5 @@ public class Tree extends CometeComposite<org.eclipse.swt.widgets.Tree> implemen
...
@@ -437,4 +452,5 @@ public class Tree extends CometeComposite<org.eclipse.swt.widgets.Tree> implemen
System
.
exit
(
0
);
System
.
exit
(
0
);
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment