Package java.awt.event

Examples of java.awt.event.ItemListener


        vo = (ItemTypeVO)list.get(i);
        d.addDomainPair(vo.getProgressiveHie02ITM02(),vo.getDescriptionSYS10());
      }
    }
    comboBoxControl1.setDomain(d);
    comboBoxControl1.getComboBox().addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED) {
          ItemTypeVO vo = (ItemTypeVO)list.get(comboBoxControl1.getSelectedIndex());
          hierarTreePanel.setCompanyCode(vo.getCompanyCodeSys01ITM02());
          hierarTreePanel.setProgressiveHIE02((BigDecimal)comboBoxControl1.getValue());
View Full Code Here


              ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
      this.add(controlCompaniesCombo,               new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
              ,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 70, 0));

      controlCompaniesCombo.setAttributeName("companyCodeSys01DOC01");
      controlCompaniesCombo.addItemListener(new ItemListener() {

        public void itemStateChanged(ItemEvent e) {
          Object companyCodeSys01 = controlCompaniesCombo.getValue();
          if (companyCodeSys01==null)
            companyCodeSys01 = controlCompaniesCombo.getDomain().getDomainPairList()[0].getCode();
View Full Code Here

            "ACC01",companiesList.get(i).toString()
        ))
          domain.addDomainPair(companiesList.get(i),companiesList.get(i).toString());
      }
      controlCompaniesCombo.setDomain(domain);
      controlCompaniesCombo.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          if (e.getStateChange()==e.SELECTED) {
            grid.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          }
        }
View Full Code Here

            "ACC01",companiesList.get(i).toString()
        ))
          domain.addDomainPair(companiesList.get(i),companiesList.get(i).toString());
      }
      controlCompaniesCombo.setDomain(domain);
      controlCompaniesCombo.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          if (e.getStateChange()==e.SELECTED) {
            grid.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          }
        }
View Full Code Here

            "ACC04",companiesList.get(i).toString()
        ))
          domain.addDomainPair(companiesList.get(i),companiesList.get(i).toString());
      }
      controlCompaniesCombo.setDomain(domain);
      controlCompaniesCombo.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          if (e.getStateChange()==e.SELECTED) {
            grid.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          }
        }
View Full Code Here

    JCheckBox clickModeToggle = new JCheckBox("Double Click Mode");
    clickModeToggle.setToolTipText("Move and attack with double click. If not checked, a single click is enough.");
    boolean selected = Boolean.parseBoolean(WtWindowManager.getInstance().getProperty(DOUBLE_CLICK_PROPERTY, "false"));
    clickModeToggle.setSelected(selected);
   
    clickModeToggle.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        boolean doubleClick = (e.getStateChange() == ItemEvent.SELECTED);
        WtWindowManager.getInstance().setProperty(DOUBLE_CLICK_PROPERTY, Boolean.toString(doubleClick));
      }
    });
    page.add(clickModeToggle);
   
    // blood
    JCheckBox showBloodToggle = new JCheckBox("Show blood and corpses");
    showBloodToggle.setToolTipText("Show blood spots on hits during fighting and corpse.");
    selected = Boolean.parseBoolean(WtWindowManager.getInstance().getProperty("gamescreen.blood", "true"));
    showBloodToggle.setSelected(selected);

    showBloodToggle.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        boolean enabled = (e.getStateChange() == ItemEvent.SELECTED);
        WtWindowManager.getInstance().setProperty("gamescreen.blood", Boolean.toString(enabled));
      }
    });
    page.add(showBloodToggle);
   
    // raising corpses
    JCheckBox autoRaiseToggle = new JCheckBox("Auto inspect corpses");
    autoRaiseToggle.setToolTipText("Automatically open the loot window for corpses of creatures you can loot");
    selected = Boolean.parseBoolean(WtWindowManager.getInstance().getProperty("gamescreen.autoraisecorpse", "true"));
    autoRaiseToggle.setSelected(selected);

    autoRaiseToggle.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        boolean enabled = (e.getStateChange() == ItemEvent.SELECTED);
        WtWindowManager.getInstance().setProperty("gamescreen.autoinspectcorpses", Boolean.toString(enabled));
      }
    });
View Full Code Here

    fontToggle.setSelected(changed);
    fontList.setEnabled(changed);
    label.setEnabled(changed);
   
    // Bind the toggle button to enabling and disabling the selector
    fontToggle.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        boolean enabled = (e.getStateChange() == ItemEvent.SELECTED);
        if (enabled) {
          String selected = fontList.getSelectedItem().toString();
          WtWindowManager.getInstance().setProperty(FONT_PROPERTY, selected);
View Full Code Here


  private void init() {
    grid.setAutoLoadData(false);

    controlCompaniesCombo.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent e) {
        Object companyCodeSys01 = controlCompaniesCombo.getValue();
        if (companyCodeSys01==null)
          companyCodeSys01 = controlCompaniesCombo.getDomain().getDomainPairList()[0].getCode();

        grid.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);

        Response res = ClientUtils.getData("loadVariantsNames",companyCodeSys01);
        if (!res.isError()) {
          variantsNames.clear();
          java.util.List list = ( (VOListResponse) res).getRows();
          VariantNameVO vo = null;
          Domain d = new Domain("DOMAIN_VARIANTS");
          for(int i=0;i<list.size();i++) {
            vo = (VariantNameVO)list.get(i);
            if (!vo.getDescriptionSYS10().equals(ApplicationConsts.JOLLY)) {
              d.addDomainPair(vo.getTableName(), vo.getDescriptionSYS10());
              variantsNames.put(vo.getTableName(),vo);
            }
          }
          varNameComboBoxControl.setDomain(d);
          if (d.getDomainPairList().length>0)
            varNameComboBoxControl.setSelectedIndex(0);
        }
      }

    });

    varNameComboBoxControl.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent e) {
        if(e.getStateChange()==e.SELECTED) {
          grid.getOtherGridParams().put(ApplicationConsts.TABLE_NAME,varNameComboBoxControl.getValue());
          VariantNameVO vo = (VariantNameVO)variantsNames.get(varNameComboBoxControl.getValue());
          Domain d = new Domain("DOMAIN_VARIANT_TYPES");
          if (vo.getUseVariantTypeITM21().booleanValue()) {
            filterPanel.remove(varTypesLabel);
            filterPanel.remove(varTypesComboBoxControl);
            filterPanel.add(varTypesLabel,   new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0
                    ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
            filterPanel.add(varTypesComboBoxControl,    new GridBagConstraints(5, 0, 1, 1, 1.0, 0.0
                    ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));

            // retrieve variant types...
            Object companyCodeSys01 = controlCompaniesCombo.getValue();
            if (companyCodeSys01==null)
              companyCodeSys01 = controlCompaniesCombo.getDomain().getDomainPairList()[0].getCode();
            GridParams gridParams = new GridParams();
            gridParams.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);
            gridParams.getOtherGridParams().put(ApplicationConsts.TABLE_NAME,varNameComboBoxControl.getValue());
            Response res = ClientUtils.getData("loadVariantTypes",gridParams);
            if (!res.isError()) {
              java.util.List list = ( (VOListResponse) res).getRows();
              VariantTypeVO vtVO = null;
              for(int i=0;i<list.size();i++) {
                vtVO = (VariantTypeVO)list.get(i);
                d.addDomainPair(vtVO.getVariantType(),vtVO.getDescriptionSys10());
              }
            }

          }
          else {
            filterPanel.remove(varTypesLabel);
            filterPanel.remove(varTypesComboBoxControl);
          }

          varTypesComboBoxControl.setDomain(d);
          if (d.getDomainPairList().length>0)
            varTypesComboBoxControl.setSelectedIndex(0);


          filterPanel.revalidate();
          filterPanel.repaint();
          grid.getOtherGridParams().put(ApplicationConsts.VARIANT_TYPE,varTypesComboBoxControl.getValue());
          grid.reloadData();
        }
      }

    });


    varTypesComboBoxControl.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent e) {
        if(e.getStateChange()==e.SELECTED) {
          grid.getOtherGridParams().put(ApplicationConsts.VARIANT_TYPE,varTypesComboBoxControl.getValue());
          grid.reloadData();
View Full Code Here


  private void init() {
    grid.setAutoLoadData(false);

    controlCompaniesCombo.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent e) {
        Object companyCodeSys01 = controlCompaniesCombo.getValue();
        if (companyCodeSys01==null)
          companyCodeSys01 = controlCompaniesCombo.getDomain().getDomainPairList()[0].getCode();

        grid.getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);

        Response res = ClientUtils.getData("loadVariantsNames",companyCodeSys01);
        if (!res.isError()) {
          variantsNames = ( (VOListResponse) res).getRows();
          VariantNameVO vo = null;
          Domain d = new Domain("DOMAIN_VARIANTS");
          for(int i=0;i<variantsNames.size();i++) {
            vo = (VariantNameVO)variantsNames.get(i);
            if (vo.getUseVariantTypeITM21().booleanValue())
              d.addDomainPair(vo.getTableName(),vo.getDescriptionSYS10());
          }
          varNameComboBoxControl.setDomain(d);
          if (d.getDomainPairList().length>0)
            varNameComboBoxControl.setSelectedIndex(0);
        }
      }

    });

    varNameComboBoxControl.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent e) {
        if(e.getStateChange()==e.SELECTED) {
          grid.getOtherGridParams().put(ApplicationConsts.TABLE_NAME,varNameComboBoxControl.getValue());
          grid.reloadData();
View Full Code Here

        vo = (DocumentTypeVO)docTypeList.get(i);
        d.addDomainPair(vo.getProgressiveHie02DOC16(),vo.getDescriptionSYS10());
      }
    }
    comboBoxControl1.setDomain(d);
    comboBoxControl1.getComboBox().addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED) {
          DocumentTypeVO vo = (DocumentTypeVO)docTypeList.get(comboBoxControl1.getSelectedIndex());
          hierarTreePanel.setCompanyCode(vo.getCompanyCodeSys01DOC16());
          hierarTreePanel.setProgressiveHIE02((BigDecimal)comboBoxControl1.getValue());
View Full Code Here

TOP

Related Classes of java.awt.event.ItemListener

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.