Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Protocols
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bioimage Analysis
Icy
Extensions
Protocols
Commits
f2946877
Commit
f2946877
authored
1 month ago
by
Thomas MUSSET
Browse files
Options
Downloads
Patches
Plain Diff
updated to v4.0.0-a.2, fix dragging in BlockPanel by adding an icon
parent
2c627994
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pom.xml
+2
-9
2 additions, 9 deletions
pom.xml
src/main/java/plugins/adufour/protocols/gui/block/BlockPanel.java
+13
-5
13 additions, 5 deletions
.../java/plugins/adufour/protocols/gui/block/BlockPanel.java
with
15 additions
and
14 deletions
pom.xml
+
2
−
9
View file @
f2946877
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
<parent>
<parent>
<groupId>
org.bioimageanalysis.icy
</groupId>
<groupId>
org.bioimageanalysis.icy
</groupId>
<artifactId>
pom-icy
</artifactId>
<artifactId>
pom-icy
</artifactId>
<version>
3.0.0-a.
1
</version>
<version>
3.0.0-a.
4
</version>
</parent>
</parent>
<artifactId>
protocols
</artifactId>
<artifactId>
protocols
</artifactId>
<version>
4.0.0-a.
1
</version>
<version>
4.0.0-a.
2
</version>
<name>
Protocols
</name>
<name>
Protocols
</name>
<description>
<description>
...
@@ -33,11 +33,4 @@
...
@@ -33,11 +33,4 @@
<artifactId>
javacl
</artifactId>
<artifactId>
javacl
</artifactId>
</dependency>
</dependency>
</dependencies>
</dependencies>
<repositories>
<repository>
<id>
icy
</id>
<url>
https://nexus-icy.pasteur.cloud/repository/icy/
</url>
</repository>
</repositories>
</project>
</project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/plugins/adufour/protocols/gui/block/BlockPanel.java
+
13
−
5
View file @
f2946877
...
@@ -269,6 +269,8 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
...
@@ -269,6 +269,8 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
*/
*/
private
static
final
ImageIcon
ICON_ERROR
=
new
IcySVGImageIcon
(
SVGIcon
.
ERROR
,
Color
.
RED
.
darker
());
private
static
final
ImageIcon
ICON_ERROR
=
new
IcySVGImageIcon
(
SVGIcon
.
ERROR
,
Color
.
RED
.
darker
());
private
static
final
ImageIcon
ICON_DRAG
=
new
IcySVGImageIcon
(
SVGIcon
.
DRAG_PAN
);
protected
final
JToolBar
toolBar
;
protected
final
JToolBar
toolBar
;
protected
final
JPanel
jPanelContent
=
new
JPanel
(
new
GridBagLayout
());
protected
final
JPanel
jPanelContent
=
new
JPanel
(
new
GridBagLayout
());
...
@@ -276,6 +278,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
...
@@ -276,6 +278,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
protected
final
JButton
bMenu
=
new
JButton
(
ICON_BLOCKS
);
protected
final
JButton
bMenu
=
new
JButton
(
ICON_BLOCKS
);
protected
final
IcyButton
bRunUntilHere
=
new
IcyButton
(
SVGIcon
.
PLAY_CIRCLE
);
protected
final
IcyButton
bRunUntilHere
=
new
IcyButton
(
SVGIcon
.
PLAY_CIRCLE
);
protected
final
JButton
bID
=
new
JButton
(
""
);
protected
final
JButton
bID
=
new
JButton
(
""
);
protected
final
JLabel
dragLabel
=
new
JLabel
(
ICON_DRAG
);
protected
final
JLabel
bStatus
=
new
JLabel
(
ICON_DIRTY
);
protected
final
JLabel
bStatus
=
new
JLabel
(
ICON_DIRTY
);
protected
final
JPopupMenu
menu
=
new
JPopupMenu
();
protected
final
JPopupMenu
menu
=
new
JPopupMenu
();
protected
final
JCheckBox
menuKeepResults
=
new
JCheckBox
(
"Remember results"
);
protected
final
JCheckBox
menuKeepResults
=
new
JCheckBox
(
"Remember results"
);
...
@@ -328,7 +331,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
...
@@ -328,7 +331,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
//name = new JLabel(" " + blockDesc.getDefinedName() + " ", JLabel.CENTER);
//name = new JLabel(" " + blockDesc.getDefinedName() + " ", JLabel.CENTER);
name
=
new
JTextField
(
blockDesc
.
getDefinedName
());
name
=
new
JTextField
(
blockDesc
.
getDefinedName
());
name
.
setBorder
(
null
);
name
.
setBorder
(
null
);
name
.
setOpaque
(
fals
e
);
name
.
setOpaque
(
tru
e
);
name
.
setEditable
(
false
);
name
.
setEditable
(
false
);
name
.
setFocusable
(
false
);
name
.
setFocusable
(
false
);
name
.
addKeyListener
(
new
KeyListener
()
{
name
.
addKeyListener
(
new
KeyListener
()
{
...
@@ -350,7 +353,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
...
@@ -350,7 +353,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
name
.
setText
(
newName
);
name
.
setText
(
newName
);
name
.
setEditable
(
false
);
name
.
setEditable
(
false
);
name
.
setFocusable
(
false
);
name
.
setFocusable
(
false
);
name
.
setOpaque
(
fals
e
);
name
.
setOpaque
(
tru
e
);
btnEdit
.
setEnabled
(
true
);
btnEdit
.
setEnabled
(
true
);
}
}
else
if
(
e
.
getExtendedKeyCode
()
==
KeyEvent
.
VK_ESCAPE
)
{
else
if
(
e
.
getExtendedKeyCode
()
==
KeyEvent
.
VK_ESCAPE
)
{
...
@@ -358,7 +361,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
...
@@ -358,7 +361,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
name
.
setText
(
tmpName
);
name
.
setText
(
tmpName
);
name
.
setEditable
(
false
);
name
.
setEditable
(
false
);
name
.
setFocusable
(
false
);
name
.
setFocusable
(
false
);
name
.
setOpaque
(
fals
e
);
name
.
setOpaque
(
tru
e
);
btnEdit
.
setEnabled
(
true
);
btnEdit
.
setEnabled
(
true
);
}
}
}
}
...
@@ -384,13 +387,18 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
...
@@ -384,13 +387,18 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener
toolBar
.
add
(
btnEdit
);
toolBar
.
add
(
btnEdit
);
toolBar
.
add
(
Box
.
createHorizontalStrut
(
10
));
updateStatusIcon
(
blockDesc
.
getStatus
());
updateStatusIcon
(
blockDesc
.
getStatus
());
toolBar
.
add
(
bStatus
);
toolBar
.
add
(
bStatus
);
toolBar
.
add
(
Box
.
createHorizontalStrut
(
5
));
toolBar
.
add
(
Box
.
createHorizontalStrut
(
5
));
toolBar
.
add
(
dragLabel
);
// FIXME: Dragging is disable when changing theme
dragLabel
.
setCursor
(
Cursor
.
getPredefinedCursor
(
Cursor
.
HAND_CURSOR
));
dragLabel
.
setFocusable
(
false
);
dragLabel
.
setOpaque
(
false
);
toolBar
.
add
(
Box
.
createHorizontalStrut
(
5
));
// Need to remove all the mouse listeners to dispatch the event
// Need to remove all the mouse listeners to dispatch the event
for
(
final
MouseListener
ml
:
toolBar
.
getMouseListeners
())
for
(
final
MouseListener
ml
:
toolBar
.
getMouseListeners
())
toolBar
.
removeMouseListener
(
ml
);
toolBar
.
removeMouseListener
(
ml
);
...
...
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