Package hermes.swing

Examples of hermes.swing.PropertyRow


    super(true);

    if (message != null) {
      HermesConfig config = HermesBrowser.getBrowser().getConfig() ;
      for (Enumeration<String> e = message.getPropertyNames(); e.hasMoreElements();) {
        PropertyRow row = new PropertyRow();
        row.name = e.nextElement();
        row.value = message.getObjectProperty(row.name);
        row.type = PropertyType.fromObject(row.value);
       
        if (config.isCopyJMSProviderProperties() || !row.name.startsWith("JMS")) {
View Full Code Here


    }
  }

  public void setProperties(Message message) throws NumberFormatException, JMSException {
    for (int i = 0; i < model.getRowCount(); i++) {
      PropertyRow row = model.getRow(i);
      if (!TextUtils.isEmpty(row.name)) {
        switch (row.type) {
        case INT:
          message.setIntProperty(row.name, row.value == null ? null : Integer.decode(row.value.toString()));
          break;
View Full Code Here

    JButton btnAdd = new JButton();
    btnAdd.setBorderPainted(false);
    btnAdd.setIcon(new ImageIcon(GenericPropertyPanel.class.getResource("/hermes/browser/icons/recordAdd.png")));
    btnAdd.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        model.addRow(new PropertyRow());
      }
    });
    options.add(btnAdd, "1, 2");

    JButton btnRemove = new JButton();
View Full Code Here

    typeColumn.setCellEditor(new DefaultCellEditor(typeCombo)) ;
    getSelectionModel().addListSelectionListener(new ListSelectionListener() {
     
      @Override
      public void valueChanged(ListSelectionEvent e) {
        PropertyRow row = model.getRow(getSelectedRow()) ;
        typeCombo.setSelectedItem(row.type) ;
      }
    }) ;
  }
View Full Code Here

    public PanelImpl(MapMessage message, boolean editable) throws JMSException {
      super(editable);

      if (message != null) {
        for (Enumeration<String> e = message.getMapNames(); e.hasMoreElements();) {
          PropertyRow row = new PropertyRow();
          row.name = e.nextElement();
          row.value = message.getObject(row.name);
          row.type = PropertyType.fromObject(row.value);
          model.addRow(row);
        }
View Full Code Here

      }
    }

    public void setProperties(MapMessage message) throws NumberFormatException, JMSException {
      for (int i = 0; i < model.getRowCount(); i++) {
        PropertyRow row = model.getRow(i);
        if (!TextUtils.isEmpty(row.name)) {
          switch (row.type) {
          case INT:
            message.setInt(row.name, Integer.decode(row.value.toString()));
            break;
View Full Code Here

TOP

Related Classes of hermes.swing.PropertyRow

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.