Examples of BinaryCellPanel


Examples of org.nasutekds.guitools.controlpanel.ui.components.BinaryCellPanel

        changedUpdate(ev);
      }
    });
    this.defaultEditor = new DefaultCellEditor(textField);
    this.passwordEditor = new DefaultCellEditor(passwordField);
    binaryPanel = new BinaryCellPanel();
    binaryPanel.addEditActionListener(new ActionListener()
    {
      /**
       * {@inheritDoc}
       */
 
View Full Code Here

Examples of org.nasutekds.guitools.controlpanel.ui.components.BinaryCellPanel

        panel.add(toAdd, gbc);
        break;
      }
      else
      {
        final BinaryCellPanel pane = new BinaryCellPanel();
        pane.setEditButtonText(INFO_CTRL_PANEL_VIEW_BUTTON_LABEL.get());
        final byte[] binaryValue = (byte[])o;
        Schema schema = getInfo().getServerDescriptor().getSchema();
        final boolean isImage = Utilities.hasImageSyntax(attrName, schema);
        pane.setValue(binaryValue, isImage);
        pane.addEditActionListener(new ActionListener()
        {
          /**
           * {@inheritDoc}
           */
          public void actionPerformed(ActionEvent ev)
View Full Code Here

Examples of org.nasutekds.guitools.controlpanel.ui.components.BinaryCellPanel

        }
        break;
      }
      else
      {
        final BinaryCellPanel pane = new BinaryCellPanel();
        Schema schema = getInfo().getServerDescriptor().getSchema();
        final boolean isImage = Utilities.hasImageSyntax(attrName, schema);
        pane.setDisplayDelete(true);
        final byte[] binaryValue = (byte[])o;
        if (binaryValue.length > 0)
        {
          pane.setValue(binaryValue, isImage);
        }
        pane.addEditActionListener(new ActionListener()
        {
          private BinaryValue newValue;
          /**
           * {@inheritDoc}
           */
          public void actionPerformed(ActionEvent ev)
          {
            if (editBinaryDlg == null)
            {
              editBinaryPanel = new BinaryAttributeEditorPanel();
              editBinaryPanel.setInfo(getInfo());
              editBinaryDlg = new GenericDialog(
                  Utilities.getFrame(SimplifiedViewEntryPanel.this),
                  editBinaryPanel);
              editBinaryDlg.setModal(true);
              Utilities.centerGoldenMean(editBinaryDlg,
                  Utilities.getParentDialog(SimplifiedViewEntryPanel.this));
            }
            if (newValue == null)
            {
              // We use an empty binary array to not breaking the logic:
              // it means that there is no value for the attribute.
              if ((binaryValue != null) && (binaryValue.length > 0))
              {
                newValue = BinaryValue.createBase64(binaryValue);
                editBinaryPanel.setValue(attrName, newValue);
              }
              else
              {
                editBinaryPanel.setValue(attrName, null);
              }
            }
            else
            {
              editBinaryPanel.setValue(attrName, newValue);
            }
            editBinaryDlg.setVisible(true);
            if (editBinaryPanel.valueChanged())
            {
              newValue = editBinaryPanel.getBinaryValue();
              pane.setValue(newValue, isImage);
              notifyListeners();
            }
          }
        });
        pane.addDeleteActionListener(new ActionListener()
        {
          /**
           * {@inheritDoc}
           */
          public void actionPerformed(ActionEvent ev)
          {
            pane.setValue((byte[])null, false);
            if (editBinaryPanel != null)
            {
              editBinaryPanel.setValue(attrName, null);
            }
            notifyListeners();
View Full Code Here

Examples of org.nasutekds.guitools.controlpanel.ui.components.BinaryCellPanel

   * Constructor of the cell renderer.
   *
   */
  public LDAPEntryTableCellRenderer()
  {
    binaryPanel = new BinaryCellPanel();
    binaryPanel.setOpaque(true);
    ocPanel = new ObjectClassCellPanel();
    ocPanel.setOpaque(true);
    GridBagConstraints gbc = new GridBagConstraints();
    add(lockLabel, gbc);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.