コード例 #1
0
ファイル: PanelMore.java プロジェクト: sbrunner/josm-plugins
 private JRadioButton getRegionButton(
     JRadioButton button, int x, int y, int w, int h, String tip) {
   button.setBounds(new Rectangle(x, y, w, h));
   button.setBorder(BorderFactory.createLoweredBevelBorder());
   button.setToolTipText(Messages.getString(tip));
   button.addActionListener(alRegion);
   regionButtons.add(button);
   return button;
 }
コード例 #2
0
ファイル: PanelSpec.java プロジェクト: ncrystal/josm-plugins
 private JRadioButton getShapeButton(
     JRadioButton button, int x, int y, int w, int h, String tip, Shp shp, Obj obj) {
   button.setBounds(new Rectangle(x, y, w, h));
   button.setBorder(BorderFactory.createLoweredBevelBorder());
   button.setToolTipText(Messages.getString(tip));
   button.addActionListener(alShape);
   shapeButtons.add(button);
   shapes.put(shp, button);
   objects.put(shp, obj);
   return button;
 }
コード例 #3
0
  private void updateBorder() {
    // Preserve old borders
    if (SwingUtils.isPreserveBorders(radioButton)) {
      return;
    }

    // Actual margin
    final boolean ltr = radioButton.getComponentOrientation().isLeftToRight();
    final Insets m =
        new Insets(
            margin.top,
            ltr ? margin.left : margin.right,
            margin.bottom,
            ltr ? margin.right : margin.left);

    // Installing border
    radioButton.setBorder(LafUtils.createWebBorder(m));
  }