Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadGUI
Commits
4bae40f9
Commit
4bae40f9
authored
Jan 11, 2022
by
helene ortiz
Browse files
Make some graphical modifications following migration to GTK3.
parent
b7cb46b7
Changes
12
Hide whitespace changes
Inline
Side-by-side
.classpath
View file @
4bae40f9
...
...
@@ -11,8 +11,9 @@
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1
.8
"
>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1
3
"
>
<attributes>
<attribute
name=
"module"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
...
...
ChangeLog
View file @
4bae40f9
4.0.134 dd/mm/yyyy
-------
* Make some graphical modifications following migration to GTK3.
4.0.133 02/12/2021
-------
* Add multiple y axis functionnality.
4.0.132 14/10/2021
-------
* Avoid crash if 'extensions' attribute for file text widgets is not provided.
4.0.131 08/10/2021
-------
* Avoid some crashes occuring during client synchronisation, if commandbox is deleted once created.
...
...
NomadDebug.sh
0 → 100755
View file @
4bae40f9
java
$args
-DSWT_GTK3
=
0
-Djava
.library.path
=
lib64/gtk:lib64/common/calculator:/usr/lib:/usr/lib:/usr/lib/x86_64-linux-gnu/jni
-Djava
.util.logging.config.file
=
conf/client/logging.properties
-jar
lib64/nomadgui-gtk.linux.x86_64.jar
$1
pom.xml
View file @
4bae40f9
...
...
@@ -117,11 +117,13 @@
<artifactId>
slf4j-jdk14
</artifactId>
<version>
1.6.6
</version>
</dependency>
<!--
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
-->
<dependency>
<groupId>
org.jogamp.gluegen
</groupId>
<artifactId>
gluegen-rt-main
</artifactId>
...
...
@@ -140,7 +142,7 @@
<dependency>
<groupId>
fr.ill.ics
</groupId>
<artifactId>
nomadcommandsystem
</artifactId>
<version>
4.0.5
2
</version>
<version>
4.0.5
3-SNAPSHOT
</version>
</dependency>
<dependency>
<!-- For CollectionUtils -->
<groupId>
org.apache.commons
</groupId>
...
...
src/main/java/fr/ill/ics/client/view/admin/swt/SWTAdministratorLoginPeer.java
View file @
4bae40f9
...
...
@@ -72,6 +72,9 @@ public class SWTAdministratorLoginPeer extends AdministratorLoginPeer {
gridData
.
horizontalSpan
=
2
;
text
.
setLayoutData
(
gridData
);
// H.ORTIZ Dec 2021: Since GTK3
text
.
setBackground
(
SWTColorFactory
.
getBackgroundColor
());
Button
logInButton
=
SWTWidgetFactory
.
getInstance
().
createPushButton
(
composite
,
"logInButtonLabel"
);
logInButton
.
addSelectionListener
(
new
SelectionAdapter
()
{
public
void
widgetSelected
(
SelectionEvent
event
)
{
...
...
src/main/java/fr/ill/ics/client/view/factory/swt/SWTWidgetFactory.java
View file @
4bae40f9
...
...
@@ -581,8 +581,8 @@ public class SWTWidgetFactory extends WidgetFactory {
*/
public
GridData
getButtonGridData
()
{
GridData
gridData
=
getGridData
();
gridData
.
widthHint
=
WidgetFactory
.
BUTTON_WIDTH
;
gridData
.
heightHint
=
WidgetFactory
.
BUTTON_HEIGHT
;
gridData
.
widthHint
=
Magnifier
.
getScaledValue
(
WidgetFactory
.
BUTTON_WIDTH
)
;
gridData
.
heightHint
=
Magnifier
.
getScaledValue
(
WidgetFactory
.
BUTTON_HEIGHT
)
;
gridData
.
grabExcessHorizontalSpace
=
false
;
gridData
.
grabExcessVerticalSpace
=
false
;
return
gridData
;
...
...
@@ -1363,6 +1363,4 @@ public class SWTWidgetFactory extends WidgetFactory {
}
});
}
}
\ No newline at end of file
src/main/java/fr/ill/ics/client/view/login/popup/swt/SWTLoginPopup.java
View file @
4bae40f9
...
...
@@ -125,6 +125,10 @@ public class SWTLoginPopup extends SWTAuthenticationPopup {
passwordGridData
.
horizontalAlignment
=
SWT
.
BEGINNING
;
passwordGridData
.
widthHint
=
LOGIN_WIDTH
;
password
.
setLayoutData
(
gridData
);
// H.ORTIZ Dec 2021: Since GTK3
login
.
setBackground
(
SWTColorFactory
.
getBackgroundColor
());
password
.
setBackground
(
SWTColorFactory
.
getBackgroundColor
());
loginButton
=
SWTWidgetFactory
.
getInstance
().
createPushButton
(
buttonsComposite
,
"loginButtonLabel"
);
loginButton
.
addSelectionListener
(
new
SelectionAdapter
()
{
...
...
src/main/java/fr/ill/ics/client/view/menu/swt/SWTAboutVersionAction.java
0 → 100644
View file @
4bae40f9
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package
fr.ill.ics.client.view.menu.swt
;
import
org.eclipse.swt.widgets.Display
;
import
fr.ill.ics.client.view.menu.IMenuAction
;
import
fr.ill.ics.client.view.swt.SWTMainWindowPeer
;
import
fr.ill.ics.client.view.util.dialog.DialogManager
;
import
fr.ill.ics.common.Nomad
;
/**
*
* @author ortizh
*
*/
public
class
SWTAboutVersionAction
implements
IMenuAction
{
/**
* Display Nomad version information
*/
public
void
execute
(
boolean
checked
,
int
x
,
int
y
)
{
Display
display
=
((
SWTMainWindowPeer
)
SWTMainWindowPeer
.
getInstance
()).
getDisplay
();
DialogManager
.
getInstance
().
nomadAboutMessageDialog
(
Nomad
.
getVersion
(),
"About"
);
}
}
\ No newline at end of file
src/main/java/fr/ill/ics/client/view/util/ImageUtils.java
View file @
4bae40f9
...
...
@@ -21,11 +21,10 @@ import java.awt.image.BufferedImage;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Base64
;
import
javax.imageio.ImageIO
;
import
org.apache.xerces.impl.dv.util.Base64
;
public
abstract
class
ImageUtils
{
/**
...
...
@@ -46,7 +45,7 @@ public abstract class ImageUtils {
ByteArrayOutputStream
bos
=
new
ByteArrayOutputStream
();
ImageIO
.
write
(
img
,
imageType
,
bos
);
// Write the image in the outputStream
byte
[]
imageBytes
=
bos
.
toByteArray
();
imageString
=
Base64
.
encode
(
imageBytes
);
imageString
=
Base64
.
getEncoder
().
encodeToString
(
imageBytes
);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
...
...
src/main/java/fr/ill/ics/client/view/variable/swt/SWTExpressionCapturePeer.java
View file @
4bae40f9
...
...
@@ -108,6 +108,7 @@ public class SWTExpressionCapturePeer extends ExpressionCapturePeer {
expressionText
=
SWTWidgetFactory
.
getInstance
().
createStyledText
(
innerComposite
,
SWT
.
MULTI
|
SWT
.
WRAP
,
FontFactory
.
STANDARD_STYLE
);
expressionText
.
setFont
(
SWTFontFactory
.
getStandardFont
(
FontFactory
.
commandLineFontDataHeight
));
GridData
gridData
=
SWTWidgetFactory
.
getInstance
().
getHorizontalGridData
();
gridData
.
heightHint
=
Magnifier
.
getScaledValue
(
80
);
expressionText
.
setLayoutData
(
gridData
);
expressionText
.
setBackground
(
SWTColorFactory
.
getTextBackgroundColor
());
...
...
@@ -221,7 +222,7 @@ public class SWTExpressionCapturePeer extends ExpressionCapturePeer {
}
Point
location
=
shell
.
getDisplay
().
map
(
text
,
null
,
text
.
getLocation
());
shell
.
setSize
(
Magnifier
.
getScaledValue
(
500
),
Magnifier
.
getScaledValue
(
1
5
0
));
shell
.
setSize
(
Magnifier
.
getScaledValue
(
500
),
Magnifier
.
getScaledValue
(
1
7
0
));
shell
.
setRedraw
(
false
);
shell
.
setLocation
(
location
.
x
-
text
.
getLocation
().
x
+
1
,
location
.
y
+
1
);
shell
.
open
();
...
...
src/main/java/fr/ill/ics/client/view/widget/swt/SWTCButton.java
View file @
4bae40f9
...
...
@@ -22,7 +22,6 @@ import org.eclipse.swt.widgets.Button;
import
org.eclipse.swt.widgets.Composite
;
import
fr.ill.ics.client.control.plugin.ControllerPlugin
;
import
fr.ill.ics.client.view.factory.WidgetFactory
;
import
fr.ill.ics.client.view.factory.swt.SWTWidgetFactory
;
import
fr.ill.ics.client.view.magnifier.Magnifier
;
import
fr.ill.ics.client.view.magnifier.swt.SWTMagnifier
;
...
...
@@ -88,7 +87,7 @@ public class SWTCButton extends CButton {
Magnifier
.
getInstance
().
removeWidgetMagnifyListener
(
this
);
}
else
{
SWTMagnifier
.
getInstance
().
magnifyControl
(
button
,
initialFontSize
);
button
.
setLayoutData
(
SWTWidgetFactory
.
getInstance
().
get
ImageGridData
(
Magnifier
.
getScaledValue
(
WidgetFactory
.
BUTTON_WIDTH
),
Magnifier
.
getScaledValue
(
WidgetFactory
.
BUTTON_HEIGHT
),
true
));
button
.
setLayoutData
(
SWTWidgetFactory
.
getInstance
().
get
ButtonGridData
());
}
}
}
\ No newline at end of file
src/main/java/fr/ill/ics/client/view/widget/swt/SWTPText.java
View file @
4bae40f9
...
...
@@ -86,6 +86,12 @@ public class SWTPText extends PText {
if
(
getProperty
()
!=
null
)
{
System
.
out
.
println
(
"PText linked with property "
+
getProperty
().
getPropertyID
()
+
"."
+
getProperty
().
getName
());
System
.
out
.
println
(
"UndoState is "
+
getProperty
().
getUndoState
()
+
" MAX LENGTH = "
+
valueMaxLength
);
if
(
text
.
getLayoutData
()
!=
null
)
{
System
.
out
.
println
(
"LayoutData "
+
text
.
getLayoutData
());
if
(
text
.
getLayoutData
()
instanceof
GridData
)
{
System
.
out
.
println
(((
GridData
)
text
.
getLayoutData
()).
widthHint
);
}
}
}
else
{
System
.
out
.
println
(
"PText linked with a null property"
);
}
...
...
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