Package com.mockturtlesolutions.snifflib.guitools.components

Examples of com.mockturtlesolutions.snifflib.guitools.components.IconifiedDomainNameTextField$DomainNameTextFieldListener


   
   
    JLabel nicknameLabel = new JLabel("Nickname:")
    this.bufferFindNameDialog = new FindNameDialog(this.Config,this.iconServer,FindNameDialog.BUFFER_SEARCH);
    this.bufferFindNameDialog.restrictToRepository(this.repositoryView.getText());
    this.nicknameText = new IconifiedDomainNameTextField(this.bufferFindNameDialog,this.iconServer);
    this.nicknameText.setText(this.Prefs.getConfigValue("default","domainname")+".");
    this.nicknameText.setNameTextToolTipText("Right click to search the buffer database.");
   
   
    this.nicknameText.addDomainNameListener(new DomainNameListener()
        {
          public void actionPerformed(DomainNameEvent e)
          {
            String buffername = ((IconifiedDomainNameTextField)e.getSource()).getText();
           
            String repos = repositoryView.getText();
            try
            {
              if (Connection.storageExists(buffername))
              {
                BufferStorage exp = (BufferStorage)Connection.getStorage(buffername);
                if (exp != null)
                {
                 
                  // if (loadedAtLeastOneBuffer)
//                   {


                  Object[] options = {"Plan to overwrite","Cancel"};
                  int n = JOptionPane.showOptionDialog(SMPBFrame.this,"Buffer "+buffername+" already exists in repostory "+repos+".","Conflict with pre-existing definition",
                      JOptionPane.YES_NO_CANCEL_OPTION,
                      JOptionPane.QUESTION_MESSAGE,
                      null,
                      options,
                      options[1]);

                  String ans = (String)options[n];

                  if (ans.equalsIgnoreCase("Cancel"))  //Revert to old nickname
                  {
                    IconifiedDomainNameTextField buffertext = (IconifiedDomainNameTextField)e.getSource();
                    buffertext.setListening(false);
                    buffertext.setText(oldNickname);
                    buffertext.setListening(true);
                  }
                   
                       
                  // }
//                   else
View Full Code Here


 
  public Object getCellEditorValue()
  {
 
    System.out.println("Allocating new memory for editor.");
    IconifiedDomainNameTextField out = new IconifiedDomainNameTextField(this.iconServer);
    out.setText(this.getText()); //Actually transfers the value.
    out.setBackground(this.editColor);
    /////These lines prevent overwriting with previous values.
    //this.setListening(false);
    //this.setText("");
    //this.setListening(true);
    /////
View Full Code Here

TOP

Related Classes of com.mockturtlesolutions.snifflib.guitools.components.IconifiedDomainNameTextField$DomainNameTextFieldListener

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.