diff --git a/pom.xml b/pom.xml index 75212a4af4d807b4adf90d8378ba9418c3a4aeff..803fb4a44abc13e3fafbda076b9da2a8bc6a71a8 100644 --- a/pom.xml +++ b/pom.xml @@ -7,11 +7,11 @@ <parent> <groupId>org.bioimageanalysis.icy</groupId> <artifactId>pom-icy</artifactId> - <version>3.0.0-a.1</version> + <version>3.0.0-a.4</version> </parent> <artifactId>protocols</artifactId> - <version>4.0.0-a.1</version> + <version>4.0.0-a.2</version> <name>Protocols</name> <description> @@ -33,11 +33,4 @@ <artifactId>javacl</artifactId> </dependency> </dependencies> - - <repositories> - <repository> - <id>icy</id> - <url>https://nexus-icy.pasteur.cloud/repository/icy/</url> - </repository> - </repositories> </project> \ No newline at end of file diff --git a/src/main/java/plugins/adufour/protocols/gui/block/BlockPanel.java b/src/main/java/plugins/adufour/protocols/gui/block/BlockPanel.java index 5c84d9fcae36f805fded7d9c9c3fcc1a3218ebcf..70d23f74ff3039b2bffe5555b30126f8a644a75e 100644 --- a/src/main/java/plugins/adufour/protocols/gui/block/BlockPanel.java +++ b/src/main/java/plugins/adufour/protocols/gui/block/BlockPanel.java @@ -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_DRAG = new IcySVGImageIcon(SVGIcon.DRAG_PAN); + protected final JToolBar toolBar; protected final JPanel jPanelContent = new JPanel(new GridBagLayout()); @@ -276,6 +278,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener protected final JButton bMenu = new JButton(ICON_BLOCKS); protected final IcyButton bRunUntilHere = new IcyButton(SVGIcon.PLAY_CIRCLE); protected final JButton bID = new JButton(""); + protected final JLabel dragLabel = new JLabel(ICON_DRAG); protected final JLabel bStatus = new JLabel(ICON_DIRTY); protected final JPopupMenu menu = new JPopupMenu(); protected final JCheckBox menuKeepResults = new JCheckBox("Remember results"); @@ -328,7 +331,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener //name = new JLabel(" " + blockDesc.getDefinedName() + " ", JLabel.CENTER); name = new JTextField(blockDesc.getDefinedName()); name.setBorder(null); - name.setOpaque(false); + name.setOpaque(true); name.setEditable(false); name.setFocusable(false); name.addKeyListener(new KeyListener() { @@ -350,7 +353,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener name.setText(newName); name.setEditable(false); name.setFocusable(false); - name.setOpaque(false); + name.setOpaque(true); btnEdit.setEnabled(true); } else if (e.getExtendedKeyCode() == KeyEvent.VK_ESCAPE) { @@ -358,7 +361,7 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener name.setText(tmpName); name.setEditable(false); name.setFocusable(false); - name.setOpaque(false); + name.setOpaque(true); btnEdit.setEnabled(true); } } @@ -384,13 +387,18 @@ public class BlockPanel extends JPanel implements ActionListener, BlockListener toolBar.add(btnEdit); - toolBar.add(Box.createHorizontalStrut(10)); - updateStatusIcon(blockDesc.getStatus()); toolBar.add(bStatus); 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 for (final MouseListener ml : toolBar.getMouseListeners()) toolBar.removeMouseListener(ml);