Package org.pdfsam.guiclient.commons.components

Examples of org.pdfsam.guiclient.commons.components.JVisualSelectionList


  protected void exportDone(JComponent source, Transferable data, int action) {
    //clean only if MOVE
    //it works only if the selection type of the JList is ListSelectionModel.SINGLE_INTERVAL_SELECTION
    if(action==MOVE){
        try{
          JVisualSelectionList listComponent = (JVisualSelectionList) source;
              TransferableData transferredData = (TransferableData)data.getTransferData(DnDSupportUtility.VISUAL_LIST_FLAVOR);
              if(transferredData != null && transferredData.getIndexesList()!=null){
                int[] dataList = transferredData.getIndexesList();
                int delta = (dataList[0] > addIndex)? dataList.length: 0;
                ((VisualListModel)listComponent.getModel()).removeElements(dataList[0]+delta, dataList[dataList.length-1]+delta, true);
              }
          addIndex = 0;
        }catch(Exception e){
          log.error(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),"Error during drag and drop."), e);
        }
View Full Code Here

TOP

Related Classes of org.pdfsam.guiclient.commons.components.JVisualSelectionList

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.