Package org.japura.gui.renderer

Examples of org.japura.gui.renderer.CheckListRenderer


  ActionMap am = getActionMap();
  am.put("Copy", copyAction);

  setModel(new DefaultListCheckModel());
  setCellRenderer(new CheckListRenderer());
  super.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

  MouseMotionListener[] mmls = getMouseMotionListeners();
  for (MouseMotionListener mml : mmls) {
    // removeMouseMotionListener(mml);
View Full Code Here


  private HashMap<CheckState, String> texts;

  public CheckComboBox() {
  texts = new HashMap<CheckState, String>();
  setRenderer(new CheckListRenderer());
  setModel(new DefaultListCheckModel());
  }
View Full Code Here

  @Override
  protected void updateComboBox() {
  getComboBox().removeAllItems();

  CheckListRenderer renderer = getCheckList().getCellRenderer();

  List<Object> checkeds = getModel().getCheckeds();
  int total = getModel().getSize();
  if (total > 0) {
    if (checkeds.size() == 0 && texts.containsKey(CheckState.NONE)) {
    getComboBox().addItem(getTextFor(CheckState.NONE));
    } else if (checkeds.size() == 1) {
    getComboBox().addItem(renderer.getText(checkeds.get(0)));
    } else if (checkeds.size() == total && texts.containsKey(CheckState.ALL)) {
    getComboBox().addItem(getTextFor(CheckState.ALL));
    } else if (checkeds.size() > 1 && texts.containsKey(CheckState.MULTIPLE)) {
    getComboBox().addItem(getTextFor(CheckState.MULTIPLE));
    }
View Full Code Here

TOP

Related Classes of org.japura.gui.renderer.CheckListRenderer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.