Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ We welcome contributions to this URCap by the community! Please refer to the [Co

This project is developed by the [Universal Robots A/S](https://universal-robots.com/) (UR) and is released under the [BSD 3-Clause License](LICENSE) found in the root of this repository. [Nicolai Anton Lynnerup](https://github.com/naly-ur) developed the URCap to jog the robot incrementally in cartesian space as a response to customer interviews conducted in 2022. The CI in this repo is heavily inspired by the work of [
Felix Exner](https://github.com/fmauch) (from: [FZI](https://www.fzi.de/)) performed for UR when developing the [External Control URCap](https://github.com/UniversalRobots/Universal_Robots_ExternalControl_URCap).

## Update View MyToolbarJog

![Screenshot 2024-02-14 100044](https://github.com/SVJ750/MyToolbarJog/assets/104130454/eef6a1cf-90e8-4b8a-82a1-1c19b43fba2b)


The size of the buttons and the X,Y,Z symbols has been changed.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Arrays;

import javax.imageio.ImageIO;
import javax.swing.BoxLayout;
import javax.swing.GroupLayout;
Expand All @@ -57,7 +56,6 @@
import javax.swing.JTextField;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import com.ur.urcap.api.contribution.toolbar.ToolbarAPIProvider;
import com.ur.urcap.api.contribution.toolbar.ToolbarContext;
import com.ur.urcap.api.contribution.toolbar.swing.SwingToolbarContribution;
Expand Down Expand Up @@ -90,18 +88,23 @@ public class JogPositionalToolbarContribution implements SwingToolbarContributio
private final int SLIDER_INCREMENT = 1;
private final double MIN_MM = 0.1;
private final double MAX_MM = 10.0;




JogPositionalToolbarContribution(ToolbarContext context) {
apiProvider = context.getAPIProvider();
keyboardInputFactory = apiProvider.getUserInterfaceAPI().getUserInteraction().getKeyboardInputFactory();
validatorFactory = apiProvider.getUserInterfaceAPI().getUserInteraction().getInputValidationFactory();
}




@Override
public void buildUI(JPanel panel) {
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.setAlignmentX(Component.LEFT_ALIGNMENT);



/**
* Slider group
*/
Expand All @@ -116,7 +119,8 @@ public void buildUI(JPanel panel) {
sliderJPanel.add(stepSizeSliderLabel);

panel.add(sliderJPanel);



/**
* Jog button group
*/
Expand All @@ -127,9 +131,9 @@ public void buildUI(JPanel panel) {
layout.setAutoCreateContainerGaps(true);
layout.setAutoCreateGaps(true);

JLabel label_x = createBoldColoredLabel("X", Color.RED);
JLabel label_y = createBoldColoredLabel("Y", Color.GREEN);
JLabel label_z = createBoldColoredLabel("Z", Color.BLUE);
JLabel label_x = createBoldColoredLabel("X", Color.RED, 28);
JLabel label_y = createBoldColoredLabel("Y", Color.GREEN, 28);
JLabel label_z = createBoldColoredLabel("Z", Color.BLUE ,28);

Component c_x = label_x;
Component c_y = label_y;
Expand Down Expand Up @@ -171,15 +175,21 @@ public void buildUI(JPanel panel) {

panel.add(buttonJPanel);
}







/**
* Create input field for step size
*
* @return JTextField
*/
private JTextField createStepSizeInputField() {
stepSizeInput = new JTextField();
stepSizeInput.setPreferredSize(new Dimension(60, 33));
stepSizeInput.setPreferredSize(new Dimension(60, 30));
stepSizeInput.setMaximumSize(stepSizeInput.getPreferredSize());
stepSizeInput.addMouseListener(new MouseAdapter() {
@Override
Expand All @@ -196,13 +206,14 @@ public void mousePressed(MouseEvent e) {
*
* @param text
* @param color
* @param FontSize
* @return JLabel colored and bold
*/
private JLabel createBoldColoredLabel(String text, Color color) {
private JLabel createBoldColoredLabel(String text, Color color, int size ) {
JLabel tmpJLabel = new JLabel(text);
tmpJLabel.setForeground(color);
Font f = tmpJLabel.getFont();
tmpJLabel.setFont(f.deriveFont(f.getStyle() | Font.BOLD));
tmpJLabel.setFont(f.deriveFont(f.getStyle() | Font.BOLD ,size ));
return tmpJLabel;
}

Expand All @@ -217,7 +228,7 @@ private JLabel createBoldColoredLabel(String text, Color color) {
*/
private JButton createJogButton(JButton button, Icon icon, final Integer index, final Boolean plus) {
button = new JButton(icon);
button.setPreferredSize(new Dimension(40, 40));
button.setPreferredSize(new Dimension(68, 68));
button.setMaximumSize(button.getPreferredSize());
button.setMinimumSize(button.getPreferredSize());

Expand Down
Binary file added mytoolbarjog.urcap
Binary file not shown.