コード例 #1
0
 @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);
 }
コード例 #2
0
 @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();
 }
コード例 #3
0
 @Override
 public void setRunMode(boolean runMode) {
   super.setRunMode(runMode);
   setCursor(runMode ? cursor : null);
 }