Examples of SelectionManager


Examples of org.fao.geonet.kernel.SelectionManager

    Set<Integer> notOwner = new HashSet<Integer>();
        boolean backupFile = Util.getParam(params, Params.BACKUP_FILE, true);

        if(context.isDebugEnabled())
            context.debug("Get selected metadata");
    SelectionManager sm = SelectionManager.getManager(session);

    synchronized(sm.getSelection("metadata")) {
    for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext();) {
      String uuid = (String) iter.next();
            if(context.isDebugEnabled())
                context.debug("Deleting metadata with uuid:"+ uuid);

      String id   = dataMan.getMetadataId(uuid);
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

    DataManager dm = gc.getBean(DataManager.class);
    UserSession us = context.getUserSession();


    context.info("Get selected metadata");
    SelectionManager sm = SelectionManager.getManager(us);

    Element ret = new Element("response");
   
    String paramId = Util.getParam(params, "id", null) ;
    ArrayList<String> lst = new ArrayList<String>();
   
    // case #1 : #id parameter is undefined
    if (paramId == null) {
        synchronized(sm.getSelection("metadata")) {
            for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext();) {
                String uuid = (String) iter.next();
                String id   = dm.getMetadataId(uuid);
                lst.add(id);
            }
        }
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

    DataManager   dm = gc.getBean(DataManager.class);
    AccessManager accessMan = gc.getBean(AccessManager.class);
    UserSession   us = context.getUserSession();

    context.info("Get selected metadata");
    SelectionManager sm = SelectionManager.getManager(us);

    Set<Integer> metadata = new HashSet<Integer>();
    Set<String> notFound = new HashSet<String>();
    Set<Integer> notOwner = new HashSet<Integer>();

    synchronized(sm.getSelection(SELECTION_METADATA)) {
    for (Iterator<String> iter = sm.getSelection(SELECTION_METADATA).iterator(); iter.hasNext();) {
      String uuid = iter.next();

      //--- check access

      Metadata info = context.getBean(MetadataRepository.class).findOneByUuid(uuid);
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

    AccessManager accessMan = gc.getBean(AccessManager.class);
    UserSession us = context.getUserSession();


    context.info("Get selected metadata");
    SelectionManager sm = SelectionManager.getManager(us);

    Set<Integer> metadata = new HashSet<Integer>();
    Set<Integer> notFound = new HashSet<Integer>();
    Set<Integer> notOwner = new HashSet<Integer>();

    synchronized(sm.getSelection("metadata")) {
    for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext();) {
      String uuid = (String) iter.next();
      String id   = dm.getMetadataId(uuid);
               
      //--- check access
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

    Set<Integer> notFound = new HashSet<Integer>();
    Set<Integer> notOwner = new HashSet<Integer>();

        if(context.isDebugEnabled())
            context.debug("Get selected metadata");
    SelectionManager sm = SelectionManager.getManager(session);

    synchronized(sm.getSelection("metadata")) {
    for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext();) {
      String uuid = (String) iter.next();
            if(context.isDebugEnabled())
                context.debug("Deleting metadata with uuid:"+ uuid);

      String id   = dataMan.getMetadataId(uuid);
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

    DataManager dm = gc.getBean(DataManager.class);
    AccessManager accessMan = gc.getBean(AccessManager.class);
    UserSession us = context.getUserSession();

    context.info("Get selected metadata");
    SelectionManager sm = SelectionManager.getManager(us);

    Set<Integer> metadata = new HashSet<Integer>();
    Set<Integer> notFound = new HashSet<Integer>();
    Set<Integer> notOwner = new HashSet<Integer>();

        final MetadataRepository metadataRepository = context.getBean(MetadataRepository.class);
        synchronized(sm.getSelection("metadata")) {
    for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext();) {
      String uuid = (String) iter.next();
      String id   = dm.getMetadataId(uuid);


            final Integer iId = Integer.valueOf(id);
View Full Code Here

Examples of org.fao.geonet.kernel.SelectionManager

    DataManager dataMan = gc.getBean(DataManager.class);
    AccessManager am = gc.getBean(AccessManager.class);
    UserSession us = context.getUserSession();

    context.info("Get selected metadata");
    SelectionManager sm = SelectionManager.getManager(us);

    Set<Integer> ids = new HashSet<Integer>();

    //-----------------------------------------------------------------------
    //--- run through the selected set of metadata records
    synchronized(sm.getSelection("metadata")) {
    for (Iterator<String> iter = sm.getSelection("metadata").iterator(); iter.hasNext();) {
      String uuid = (String) iter.next();
      String id   = dataMan.getMetadataId(uuid);

      //--- check access, if owner then process
     
View Full Code Here

Examples of org.gephi.visualization.api.selection.SelectionManager

        //SelectionManager events
        VizController.getInstance().getSelectionManager().addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                SelectionManager selectionManager = VizController.getInstance().getSelectionManager();

                if (selectionManager.isRectangleSelection() && currentTool != null) {
                    toolbar.clearSelection();
                    unselect();
                } else if (selectionManager.isSelectionEnabled() && currentTool != null && currentTool.getSelectionType() == ToolSelectionType.NONE) {
                    toolbar.clearSelection();
                    unselect();
                } else if (selectionManager.isDraggingEnabled() && currentTool != null) {
                    toolbar.clearSelection();
                    unselect();
                }
            }
        });
View Full Code Here

Examples of org.gephi.visualization.api.selection.SelectionManager

        }
    }

    public JPopupMenu createPopup() {

        SelectionManager manager = VizController.getInstance().getSelectionManager();
        final MouseSelectionPopupPanel popupPanel = new MouseSelectionPopupPanel();
        popupPanel.setDiameter(manager.getMouseSelectionDiameter());
        popupPanel.setProportionnalToZoom(manager.isMouseSelectionZoomProportionnal());
        popupPanel.setChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                SelectionManager manager = VizController.getInstance().getSelectionManager();
                manager.setMouseSelectionDiameter(popupPanel.getDiameter());
                manager.setMouseSelectionZoomProportionnal(popupPanel.isProportionnalToZoom());
            }
        });

        JPopupMenu menu = new JPopupMenu();
        menu.add(popupPanel);
View Full Code Here

Examples of org.gephi.visualization.api.selection.SelectionManager

        menu.add(popupPanel);
        return menu;
    }

    public void refresh() {
        SelectionManager manager = VizController.getInstance().getSelectionManager();
        if (manager.isSelectionEnabled()) {
            if (manager.isRectangleSelection()) {
                mouseSelection = false;
                statusLabel.setText(NbBundle.getMessage(SelectionBar.class, "SelectionBar.statusLabel.rectangleSelection"));
            } else if (manager.isDirectMouseSelection()) {
                mouseSelection = true;
                statusLabel.setText(NbBundle.getMessage(SelectionBar.class, "SelectionBar.statusLabel.mouseSelection"));
            } else if (manager.isDraggingEnabled()) {
                mouseSelection = true;
                statusLabel.setText(NbBundle.getMessage(SelectionBar.class, "SelectionBar.statusLabel.dragging"));
            }
        } else {
            mouseSelection = false;
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.