javax.swing.JToggleButton.getClientProperty()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中javax.swing.JToggleButton.getClientProperty()方法的一些代码示例,展示了JToggleButton.getClientProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToggleButton.getClientProperty()方法的具体详情如下:
包路径:javax.swing.JToggleButton
类名称:JToggleButton
方法名:getClientProperty

JToggleButton.getClientProperty介绍

暂无

代码示例

代码示例来源:origin: tinyMediaManager/tinyMediaManager

@Override
 public void actionPerformed(ActionEvent arg0) {
  for (JToggleButton button : buttons) {
   if (button.getClientProperty("MediaArtworkExtrathumb") instanceof JCheckBox) {
    JCheckBox chkbx = (JCheckBox) button.getClientProperty("MediaArtworkExtrathumb");
    chkbx.setSelected(true);
   }
  }
 }
});

代码示例来源:origin: tinyMediaManager/tinyMediaManager

@Override
 public void actionPerformed(ActionEvent arg0) {
  for (JToggleButton button : buttons) {
   if (button.getClientProperty("MediaArtworkExtrafanart") instanceof JCheckBox) {
    JCheckBox chkbx = (JCheckBox) button.getClientProperty("MediaArtworkExtrafanart");
    chkbx.setSelected(false);
   }
  }
 }
});

代码示例来源:origin: tinyMediaManager/tinyMediaManager

@Override
 public void actionPerformed(ActionEvent arg0) {
  for (JToggleButton button : buttons) {
   if (button.getClientProperty("MediaArtworkExtrathumb") instanceof JCheckBox) {
    JCheckBox chkbx = (JCheckBox) button.getClientProperty("MediaArtworkExtrathumb");
    chkbx.setSelected(false);
   }
  }
 }
});

代码示例来源:origin: tinyMediaManager/tinyMediaManager

@Override
 public void actionPerformed(ActionEvent arg0) {
  for (JToggleButton button : buttons) {
   if (button.getClientProperty("MediaArtworkExtrafanart") instanceof JCheckBox) {
    JCheckBox chkbx = (JCheckBox) button.getClientProperty("MediaArtworkExtrafanart");
    chkbx.setSelected(true);
   }
  }
 }
});

代码示例来源:origin: stackoverflow.com

public class MyActionListener implements ActionListener {

  @Override
  public void actionPerformed(ActionEvent e) {
    JToggleButton btn = (JToggleButton) e.getSource();
    System.out.println("clicked column " + btn.getClientProperty("column")
        + ", row " + btn.getClientProperty("row"));
}

代码示例来源:origin: tinyMediaManager/tinyMediaManager

if (button.getClientProperty("MediaArtworkExtrafanart") instanceof JCheckBox
  && button.getClientProperty("MediaArtwork") instanceof MediaArtwork
  && button.getClientProperty("MediaArtworkSize") instanceof JComboBox) {
 JCheckBox chkbx = (JCheckBox) button.getClientProperty("MediaArtworkExtrafanart");
 if (chkbx.isSelected()) {
  MediaArtwork artwork = (MediaArtwork) button.getClientProperty("MediaArtwork");
  @SuppressWarnings("rawtypes")
  JComboBox cb = (JComboBox) button.getClientProperty("MediaArtworkSize");
  if (cb.getSelectedItem() instanceof ImageSizeAndUrl) {
   ImageSizeAndUrl size = (ImageSizeAndUrl) cb.getSelectedItem();

代码示例来源:origin: tinyMediaManager/tinyMediaManager

if (button.getClientProperty("MediaArtworkExtrathumb") instanceof JCheckBox
  && button.getClientProperty("MediaArtwork") instanceof MediaArtwork
  && button.getClientProperty("MediaArtworkSize") instanceof JComboBox) {
 JCheckBox chkbx = (JCheckBox) button.getClientProperty("MediaArtworkExtrathumb");
 if (chkbx.isSelected()) {
  MediaArtwork artwork = (MediaArtwork) button.getClientProperty("MediaArtwork");
  @SuppressWarnings("rawtypes")
  JComboBox cb = (JComboBox) button.getClientProperty("MediaArtworkSize");
  if (cb.getSelectedItem() instanceof ImageSizeAndUrl) {
   ImageSizeAndUrl size = (ImageSizeAndUrl) cb.getSelectedItem();

代码示例来源:origin: de.sciss/prefuse-core

public void actionPerformed(ActionEvent e) {
  if ( m_ignore ) { return; } else { m_ignore = true; }
  
  JToggleButton tb = (JToggleButton)e.getSource();
  boolean sel = tb.isSelected();
  int idx = ((Integer)tb.getClientProperty("idx")).intValue();
  if ( m_type == RADIO ) {
    m_sel.setSelectionInterval(idx,idx);
  } else if ( sel ) {
    m_sel.addSelectionInterval(idx,idx);
  } else {
    m_sel.removeSelectionInterval(idx,idx);
  }
  
  m_ignore = false;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api

@Override
  public void actionPerformed(ActionEvent e) {
    Object s = e.getSource();            
    if(s instanceof JToggleButton) {
      JToggleButton tgb = (JToggleButton)s;
      Object o = tgb.getClientProperty(TOOLBAR_FILTER);
      assert o != null;
      if(o != null) {
        VCSCommitFilter f = (VCSCommitFilter) o;
        boolean selected = tgb.isSelected();
        if(selected != f.isSelected()) {
          f.setSelected(selected);
          String id = f.getID();                        
          for (VCSCommitFilter filter : filters.values()) {
            if(!filter.getID().equals(id)) {
              filter.setSelected(!selected);
            }
          }
          master.computeNodes();
        } else {
          return;
        }
      } 
    }
  }
}

代码示例来源:origin: tinyMediaManager/tinyMediaManager

Object clientProperty = button.getClientProperty("MediaArtwork");
if (clientProperty instanceof MediaArtwork) {
 artwork = (MediaArtwork) clientProperty;
 clientProperty = button.getClientProperty("MediaArtworkSize");

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-gis

{ quadrant4.putClientProperty("$value", new Integer(4));  Object $buttonGroup = quadrant4.getClientProperty("$buttonGroup"); if ($buttonGroup instanceof JAXXButtonGroup) { ((JAXXButtonGroup) $buttonGroup).updateSelectedValue(); } }
{ quadrant1.putClientProperty("$value", new Integer(1));  Object $buttonGroup = quadrant1.getClientProperty("$buttonGroup"); if ($buttonGroup instanceof JAXXButtonGroup) { ((JAXXButtonGroup) $buttonGroup).updateSelectedValue(); } }
{ quadrant3.putClientProperty("$value", new Integer(3));  Object $buttonGroup = quadrant3.getClientProperty("$buttonGroup"); if ($buttonGroup instanceof JAXXButtonGroup) { ((JAXXButtonGroup) $buttonGroup).updateSelectedValue(); } }
{ quadrant2.putClientProperty("$value", new Integer(2));  Object $buttonGroup = quadrant2.getClientProperty("$buttonGroup"); if ($buttonGroup instanceof JAXXButtonGroup) { ((JAXXButtonGroup) $buttonGroup).updateSelectedValue(); } }

代码示例来源:origin: com.fifesoft.rtext/fife.common

final JToggleButton tb = (JToggleButton)source;
ScrollableJPopupMenu popup = new ScrollableJPopupMenu();
addItemsFor((File)tb.getClientProperty(PROPERTY_LOCATION), popup);
popup.applyComponentOrientation(getComponentOrientation());
popup.addPopupMenuListener(new BreadcrumbPopupMenuListener(tb));

相关文章

JToggleButton类方法