Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NomadGUI
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Instrument Control
NomadGUI
Commits
89d40cdf
Commit
89d40cdf
authored
3 years ago
by
helene ortiz
Browse files
Options
Downloads
Patches
Plain Diff
in16b crash (Thu 8 Jul 15:15:51 CEST 2021)
parent
3d7ead3c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/ill/ics/client/view/command/content/swt/SWTCommandBoxPeer.java
+24
-12
24 additions, 12 deletions
...cs/client/view/command/content/swt/SWTCommandBoxPeer.java
with
24 additions
and
12 deletions
src/main/java/fr/ill/ics/client/view/command/content/swt/SWTCommandBoxPeer.java
+
24
−
12
View file @
89d40cdf
...
...
@@ -222,7 +222,8 @@ public class SWTCommandBoxPeer extends CommandBoxPeer {
// Create the title label
titleLabel
=
SWTWidgetFactory
.
getInstance
().
createLabel
(
titleAreaComposite
,
""
,
FontFactory
.
standardFontDataHeight
,
FontFactory
.
BOLD_STYLE
);
titleLabel
.
setForeground
(
SWTColorFactory
.
getTabButtonTextColor
());
addMouseListenerOnTitle
();
if
(
addExtraLabelInTitle
())
{
PContainer
container
=
((
SWTPWidgetFactory
)(
PWidgetFactory
.
getInstance
())).
convertToPContainer
(
titleAreaComposite
);
extraLabel
=
SWTPWidgetFactory
.
getInstance
().
createSimpleLabel
(
container
,
getExtraLabelTextKey
(),
FontFactory
.
standardFontDataHeight
,
FontFactory
.
STANDARD_STYLE
);
...
...
@@ -280,14 +281,14 @@ public class SWTCommandBoxPeer extends CommandBoxPeer {
toolBarFormData
.
top
=
new
FormAttachment
(
minMaxIndicatorCanvas
,
0
,
SWT
.
CENTER
);
toolBarFormData
.
right
=
new
FormAttachment
(
100
,
-
Magnifier
.
getScaledValue
(
Constants
.
MIN_MAX_INDICATOR_X
));
executionBarComposite
.
setLayoutData
(
toolBarFormData
);
/*
checkExpressionCanvas.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent event) {
SWTImageUtils.drawScaledImage(event.gc, checkExpressionImage, 0, 0);
}
});
*/
*/
backgroundCanvas
.
addPaintListener
(
new
PaintListener
()
{
public
void
paintControl
(
PaintEvent
event
)
{
...
...
@@ -351,7 +352,7 @@ public class SWTCommandBoxPeer extends CommandBoxPeer {
formData
.
left
=
new
FormAttachment
(
executionImageCanvas
,
Magnifier
.
getScaledValue
(
Constants
.
TITLE_SPACING_X
));
titleLabel
.
setLayoutData
(
formData
);
setTitleAreaCompositeLayoutData
();
if
(
commandBox
.
needsToolBarParentContainer
())
{
// Toolbar content
toolBarCompositeFormData
=
new
FormData
();
...
...
@@ -375,7 +376,7 @@ public class SWTCommandBoxPeer extends CommandBoxPeer {
private
void
setToolBarCompositeLayoutData
()
{
toolBarCompositeFormData
.
top
=
new
FormAttachment
(
controllerImageCanvas
,
0
,
SWT
.
CENTER
);
if
(
addExtraLabelInTitle
())
{
toolBarCompositeFormData
.
left
=
new
FormAttachment
(((
SWTSimpleLabel
)
extraLabel
).
getLabel
(),
Magnifier
.
getScaledValue
(
Constants
.
TITLE_SPACING_X
)
*
4
);
}
else
{
...
...
@@ -990,11 +991,11 @@ public class SWTCommandBoxPeer extends CommandBoxPeer {
@Override
public
final
void
setFocus
()
{
// H.ORTIZ 17 JUN 2019
// Fix bug: if the user has selected the command box by a click on a text field which is not the first one,
// the focus goes however in the first text widget
//if (commandContentComposite.getChildren() != null && commandContentComposite.getChildren().length > 0) {
// commandContentComposite.getChildren()[0].setFocus();
//}
...
...
@@ -1004,12 +1005,12 @@ public class SWTCommandBoxPeer extends CommandBoxPeer {
protected
boolean
addExtraLabelInTitle
()
{
return
false
;
}
protected
Label
getExtraLabel
()
{
return
null
;
}
protected
String
getExtraLabelTextKey
()
{
return
""
;
}
...
...
@@ -1025,12 +1026,23 @@ public class SWTCommandBoxPeer extends CommandBoxPeer {
controllerImageCanvas
.
setToolTipText
(
ConfigManager
.
getInstance
().
getString
(
"commandBoxGoToSettingsTooltip"
)
+
" "
+
commandBox
.
getName
());
controllerImageCanvas
.
setCursor
(
SWTWidgetFactory
.
getInstance
().
getHandCursor
());
}
protected
void
onControllerImageClick
()
{
MainWindow
.
getInstance
().
goToNode
(
SelectionPlugin
.
SETTINGS_ID
,
commandBox
.
getName
());
}
protected
void
addMouseListenerOnTitle
()
{
titleLabel
.
addMouseListener
(
new
MouseAdapter
()
{
@Override
public
void
mouseDoubleClick
(
MouseEvent
e
)
{
if
(
commandBox
.
isAtomic
())
{
Nomad
.
displayMap
(
commandBox
.
getControllerCommandPlugin
().
getControllers
());
}
}
});
}
/*
@Override
protected void redrawCheckExpressionImage() {
...
...
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