Package org.gvt.util

Examples of org.gvt.util.EntityHolder


//    }
  }

  public EntityHolder getEntity()
  {
    return new EntityHolder(entity);
  }
View Full Code Here


         * Could, and perhaps should, be done in a better way...
         * */
        boolean isProt = false;
        if (node instanceof Actor){
          Actor a = (Actor) node;
          EntityHolder holder = a.getEntity();
          isProt = holder.l2pe.getClass().toString().contains("tein");
         
        }

        if (data == null)
View Full Code Here

                for (String selected : selectionResult)
                {
                    //search among all sourceAddedEntities
                    for (int j = 0 ; j < sourceAddedEntities.size() ; j++)
                    {
                        EntityHolder entity = sourceAddedEntities.get(j);

                        //if corresponding entity is found
                        if (selected != null && selected.equals(entity.getName()))
                        {
                            //remove entity from sourceAddedEntities ArrayList
                            sourceAddedEntities.remove(j);

                            //remove entity keyName from source entity list
                            entityList.remove(selected);
                        }
                    }
               }
            }
        });

        //Target add button

        targetAddButton = new Button(shell, SWT.NONE);
        targetAddButton.setText("Add...");
        gridData = new GridData(GridData.END, GridData.BEGINNING, true, false);
        gridData.minimumWidth = 100;
        gridData.horizontalIndent = 5;
        targetAddButton.setLayoutData(gridData);
        targetAddButton.addSelectionListener(new SelectionAdapter()
        {
            public void widgetSelected(SelectionEvent arg0)
            {
                //new addEntityDialog
                AddEntityDialog addEntity =
                    new AddEntityDialog(new Shell(), allEntities);

                //open dialog
                boolean addPressed = addEntity.open();

                //if add button is pressed
                if (addPressed)
                {
                    //for each selected entity
                    for (EntityHolder entity : addEntity.getSelectedEntities())
                    {
                        //check if entity has been added before
                        if (!previouslyAdded(entity, targetAddedEntities))
                        {
                            //add entity keyName to target entity list
                            targetEntityList.add(entity.getName());

                            //add entity to targetAddedEntities ArrayList
                            targetAddedEntities.add(entity);
                        }
                    }
                }
            }
        });

        //Target remove button

        targetRemoveButton = new Button(shell, SWT.NONE);
        targetRemoveButton.setText("Remove");
        gridData = new GridData(GridData.BEGINNING, GridData.BEGINNING,
            true, false);
        gridData.horizontalIndent = 5;
        gridData.minimumWidth = 100;
        targetRemoveButton.setLayoutData(gridData);
        targetRemoveButton.addSelectionListener(new SelectionAdapter()
        {
            public void widgetSelected(SelectionEvent arg0)
            {
                String[] selectionResult = targetEntityList.getSelection();

                //for each selected string
                for (String selected : selectionResult)
                {
                    //search among all targetAddedEntities
                    for (int j = 0 ; j < targetAddedEntities.size() ; j++)
                    {
                        EntityHolder entity = targetAddedEntities.get(j);

                        //if corresponding entity is found
                        if (selected != null &&
                            selected.equals(entity.getName()))
                        {
                            //remove entity from targetAddedEntities ArrayList
                            targetAddedEntities.remove(j);

                            //remove entity keyName from target entity list
View Full Code Here

TOP

Related Classes of org.gvt.util.EntityHolder

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.