Package frost.messaging.frost.boards

Examples of frost.messaging.frost.boards.Board$BoardUpdateInformationComparator


        if (chosenBoards == null || chosenBoards.size() == 0) { // nothing chosed or cancelled
            return;
        }

        for (int i = 0; i < chosenBoards.size(); i++) {
            final Board chosedBoard = chosenBoards.get(i);

            String privKey = chosedBoard.getPrivateKey();

            if (privKey != null) {
                final int answer =
                    JOptionPane.showConfirmDialog(this,
                        language.formatMessage("MessageFrame.attachBoard.sendPrivateKeyConfirmationDialog.body", chosedBoard.getName()),
                        language.getString("MessageFrame.attachBoard.sendPrivateKeyConfirmationDialog.title"),
                        JOptionPane.YES_NO_OPTION);
                if (answer == JOptionPane.NO_OPTION) {
                    privKey = null; // don't provide privkey
                }
            }
            // build a new board because maybe privKey shouldn't be uploaded
            final Board aNewBoard =
                new Board(chosedBoard.getName(), chosedBoard.getPublicKey(), privKey, chosedBoard.getDescription());
            final MFAttachedBoard ab = new MFAttachedBoard(aNewBoard);
            boardsTableModel.addRow(ab);
        }
        positionDividers();
    }
View Full Code Here


            newMessage.setHasFileAttachments(true);
        }
        if( boardsTableModel.getRowCount() > 0 ) {
            for(int x=0; x < boardsTableModel.getRowCount(); x++) {
                final MFAttachedBoard ab = (MFAttachedBoard)boardsTableModel.getRow(x);
                final Board aChosedBoard = ab.getBoardObject();
                final BoardAttachment ba = new BoardAttachment(aChosedBoard);
                newMessage.addAttachment(ba);
            }
            newMessage.setHasBoardAttachments(true);
        }
View Full Code Here

                return;
            }
        }
        final AttachmentList<BoardAttachment> boardAttachmentList = selectedMessage.getAttachmentsOfTypeBoard();
        for( final int element : selectedRows ) {
            final Board fbo = boardAttachmentList.get(element).getBoardObj();
            final String boardName = fbo.getName();

            // search board in exising boards list
            final Board board = mainFrame.getFrostMessageTab().getTofTreeModel().getBoardByName(boardName);

            //ask if we already have the board
            if (board != null) {
                if (JOptionPane.showConfirmDialog(
                        this,
                        "You already have a board named " + boardName + ".\n" +
                            "Are you sure you want to add this one over it?",
                        "Board already exists",
                        JOptionPane.YES_NO_OPTION) != 0)
                {
                    continue; // next row of table / next attached board
                } else {
                    // change existing board keys to keys of new board
                    board.setPublicKey(fbo.getPublicKey());
                    board.setPrivateKey(fbo.getPrivateKey());
                    mainFrame.updateTofTree(board);
                }
            } else {
                // its a new board
                if(targetFolder == null) {
View Full Code Here

   
    if (hasBoardAttachments()) {
      result.append("\n\nAttached boards:");
     
      for(BoardAttachment boardAttachment : getAttachmentsOfTypeBoard()) {
        final Board board = boardAttachment.getBoardObj();
        result.append("\nName: ").append(board.getName()).append('\n');
        if( board.getPublicKey() != null ) {
          result.append("PubKey: ").append(board.getPublicKey()).append('\n');
          if( board.getPrivateKey() != null ) {
            result.append("PrivKey: ").append(board.getPrivateKey()).append('\n');
          }
        }
      }
    }
View Full Code Here

        final FrostDownloadItem item = modelTable.getSelectedItems().get(0);
        final String boardName = item.getAssociatedBoardName();
        final String messageId = item.getAssociatedMessageId();

        if (boardName != null && messageId != null) {
          final Board board = MainFrame.getInstance().getFrostMessageTab().getTofTreeModel().getBoardByName(
              boardName);
          final TofTree t = MainFrame.getInstance().getFrostMessageTab().getTofTree();

          if (board != null && t != null) {
            t.clearSelection();
            MainFrame.getInstance().getFrostMessageTab().forceSelectMessageId(messageId);
            t.setSelectionPath(new TreePath(board.getPath()));
            MainFrame.getInstance().selectTabbedPaneTab("MainFrame.tabbedPane.news");
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of frost.messaging.frost.boards.Board$BoardUpdateInformationComparator

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.