Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vdt-plugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
vdt-plugin
Commits
fb864f90
Commit
fb864f90
authored
Feb 02, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved enum-type parameter labels to tooltips
parent
05faded9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
ComboComponent.java
src/com/elphel/vdt/ui/options/component/ComboComponent.java
+16
-1
ListOption.java
src/com/elphel/vdt/ui/options/project/ListOption.java
+1
-1
ListTabComponent.java
src/com/elphel/vdt/ui/tools/params/ListTabComponent.java
+2
-0
No files found.
src/com/elphel/vdt/ui/options/component/ComboComponent.java
View file @
fb864f90
...
@@ -43,7 +43,22 @@ public class ComboComponent extends GeneralComponent {
...
@@ -43,7 +43,22 @@ public class ComboComponent extends GeneralComponent {
comboField
=
new
Combo
(
parent
,
SWT
.
DROP_DOWN
|
SWT
.
READ_ONLY
);
comboField
=
new
Combo
(
parent
,
SWT
.
DROP_DOWN
|
SWT
.
READ_ONLY
);
comboField
.
setLayoutData
(
gridData
);
comboField
.
setLayoutData
(
gridData
);
comboField
.
setItems
(
type
.
getLabels
());
// comboField.setItems(type.getLabels());
comboField
.
setItems
(
type
.
getValues
());
StringBuilder
sb
=
new
StringBuilder
();
String
[]
values
=
type
.
getValues
();
String
[]
labels
=
type
.
getLabels
();
for
(
int
i
=
0
;
i
<
type
.
getValues
().
length
;
i
++){
sb
.
append
(
"\""
);
sb
.
append
(
values
[
i
]);
sb
.
append
(
"\" - "
);
sb
.
append
(
labels
[
i
]);
if
(
i
<(
values
.
length
-
1
)){
sb
.
append
(
"\n\n"
);
}
}
comboField
.
setToolTipText
(
sb
.
toString
());
comboField
.
setMenu
(
createPopupMenu
(
comboField
.
getShell
()));
comboField
.
setMenu
(
createPopupMenu
(
comboField
.
getShell
()));
endCreateControl
();
endCreateControl
();
...
...
src/com/elphel/vdt/ui/options/project/ListOption.java
View file @
fb864f90
...
@@ -43,7 +43,7 @@ public class ListOption implements IOption {
...
@@ -43,7 +43,7 @@ public class ListOption implements IOption {
}
}
/**
/**
* Return core option (opti
u
on without UI elements)
* Return core option (option without UI elements)
*/
*/
public
Option
getOption
()
{
public
Option
getOption
()
{
return
option
;
return
option
;
...
...
src/com/elphel/vdt/ui/tools/params/ListTabComponent.java
View file @
fb864f90
...
@@ -35,10 +35,12 @@ public class ListTabComponent extends AbstractTabComponent {
...
@@ -35,10 +35,12 @@ public class ListTabComponent extends AbstractTabComponent {
,
Parameter
toolParameter
)
,
Parameter
toolParameter
)
{
{
super
(
tab
,
new
ComboComponent
(
toolParameter
));
super
(
tab
,
new
ComboComponent
(
toolParameter
));
System
.
out
.
println
(
"Created ListTabComponent, label= "
+
toolParameter
.
getLabel
());
}
}
public
void
createControl
(
Composite
parent
)
{
public
void
createControl
(
Composite
parent
)
{
super
.
createControl
(
parent
);
super
.
createControl
(
parent
);
System
.
out
.
println
(
"createControl(), parent= "
+
parent
);
WidgetListener
listener
=
new
WidgetListener
();
WidgetListener
listener
=
new
WidgetListener
();
getComboField
().
addSelectionListener
(
listener
);
getComboField
().
addSelectionListener
(
listener
);
getComboField
().
addModifyListener
(
listener
);
getComboField
().
addModifyListener
(
listener
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment