/** * Gets the instance of the StopButton * * @return The instance of the StopButton */ public static JButton getStopButton() { if (stopButton == null) { stopButton = new JButton(); stopButton.setText(Constants.STOP); stopButton.setHorizontalAlignment(SwingConstants.CENTER); stopButton.setFont(Constants.DEFAULT_BUTTON_FONT); stopButton.setAlignmentX(Component.CENTER_ALIGNMENT); stopButton.setActionCommand(Constants.STOP); stopButton.addActionListener(ButtonListener.getInstance()); stopButton.setEnabled(false); } return stopButton; }
/** * Gets the instance of the CenterButton * * @return The instance of the CenterButton */ public static JButton getCenterButton() { if (centerButton == null) { centerButton = new JButton(); centerButton.setText(Constants.CENTER); centerButton.setHorizontalAlignment(SwingConstants.CENTER); centerButton.setFont(new Font("Dialog", Font.BOLD, 14)); centerButton.setAlignmentX(Component.CENTER_ALIGNMENT); centerButton.setActionCommand(Constants.CENTER); centerButton.addActionListener(ButtonListener.getInstance()); } return centerButton; }
/** * Gets the instance of the ConnectButton * * @return The instance of the ConnectButton */ public static JButton getConnectButton() { if (connectButton == null) { connectButton = new JButton(); connectButton.setText(Constants.CONNECT); connectButton.setHorizontalAlignment(SwingConstants.CENTER); connectButton.setFont(Constants.DEFAULT_BUTTON_FONT); connectButton.setAlignmentX(Component.CENTER_ALIGNMENT); connectButton.setActionCommand(Constants.CONNECT); connectButton.addActionListener(ButtonListener.getInstance()); } return connectButton; }