@Override public void setEnabled(boolean value) { super.setEnabled(value); if (runMode) { if (value) { if (cursor == null || cursor.isDisposed()) { cursor = Cursors.HAND; } } else { cursor = null; } } setCursor(runMode ? cursor : null); }
@Override protected void layout() { Rectangle clientArea = getClientArea().getCopy(); if (boolLabel.isVisible()) { Dimension labelSize = boolLabel.getPreferredSize(); boolLabel.setBounds( new Rectangle( getLabelLocation( clientArea.x + clientArea.width / 2 - labelSize.width / 2, clientArea.y + clientArea.height / 2 - labelSize.height / 2), new Dimension(labelSize.width, labelSize.height))); } super.layout(); }
@Override public void setRunMode(boolean runMode) { super.setRunMode(runMode); setCursor(runMode ? cursor : null); }