Package com.googlecode.richrest.client

Examples of com.googlecode.richrest.client.PropertyInfo


        }
      }
    });*/
    configurationList.getSelectionModel().addListSelectionListener(new ListSelectionListener(){
      public void valueChanged(ListSelectionEvent e) {
        final PropertyInfo configuration = (PropertyInfo)configurationList.getSelectedValue();
        if (configuration != null) {
          String name = configuration.getName();
          if (name != null)
            nameLabel.setText(name);
          else
            nameLabel.setText("");
        }
        editButton.setEnabled(configuration != null);
      }
    });

    JButton resetButton = new JButton("刷新", Images.getIcon("refresh.gif"));
    resetButton.setToolTipText("刷新配置列表");
    toolBar.add(resetButton);
    resetButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try {
          refreshConfigurationList();
          JOptionPane.showMessageDialog(ConfigurationPane.this, "刷新配置列表成功!", "刷新配置列表", JOptionPane.INFORMATION_MESSAGE);
        } catch (Throwable t) {
          JOptionPane.showMessageDialog(ConfigurationPane.this, "刷新配置列表失败! 原因: " + t.getMessage(), "刷新配置列表", JOptionPane.WARNING_MESSAGE);
        }
      }
    });

    try {
      refreshConfigurationList();
    } catch (Throwable t) {
      // ignore
    }

    configurationListener = new ConfigurationDelegate(new PropertyAdapter() {
      public void onPropertyChanged(final PropertyEvent event) {
        PropertyInfo configuration = event.getPropertyInfo();
        synchronized (configurationModel) {
          configurationModel.removeElement(configuration);
          configurationModel.addElement(configuration);
        }
      }
View Full Code Here


    private static final long serialVersionUID = 1L;

    public Component getListCellRendererComponent(JList list, Object value,
        int index, boolean isSelected, boolean cellHasFocus) {
      super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
      PropertyInfo configuration = (PropertyInfo)value;
      if(configuration.getName() != null)
        this.setIcon(enableIcon);
      else
        this.setIcon(disableIcon);
      this.setText(configuration.toString());
      return this;
    }
View Full Code Here

    configurationList = new List(this, SWT.BORDER|SWT.V_SCROLL|SWT.H_SCROLL);
    configurationList.setBounds(0, 40, 484, 400);

    configurationListener = new PropertyListener() {
      public void onPropertyChanged(final PropertyEvent event) {
        final PropertyInfo configuration = event.getPropertyInfo();
        synchronized (configurations) {
          if (configurations.contains(configuration)) {
            final int i = configurations.indexOf(configuration);
            configurations.set(i, configuration);
            configurationList.setItem(i, configuration.toString());
          }
        }
      }
      public boolean isAsync() {
        return false;
View Full Code Here

TOP

Related Classes of com.googlecode.richrest.client.PropertyInfo

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.