Examples of EncounterParticipant


Examples of org.criticalfailure.torchlight.core.encounter.common.entity.EncounterParticipant

    @Override
    public void runWithEvent(Event event) {
        logger.debug("running 'add encounter participant' with event: " + event);

        for(ObjectInstance oi : selectedParticipants) {
            EncounterParticipant ep = new EncounterParticipant();
            ep.setParticipant(oi);

            editor.addParticipant(ep);
        }
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.encounter.common.entity.EncounterParticipant

            @Override
            public Image getImage(Object element) {
                if(element instanceof EncounterParticipant) {
                    logger.debug("element is an encounter participant");

                    EncounterParticipant current = getCurrentParticipant();
                    if(current == element) {
                        return markerImage;
                    }
                }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.encounter.common.entity.EncounterParticipant

     * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
     */
    @Override
    public void runWithEvent(Event event) {

        EncounterParticipant ep = new EncounterParticipant();

        // TODO: give the user the chance to select the participant

        view.addParticipant(ep);
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.encounter.common.entity.EncounterParticipant

                logger.debug("element is an encounter participant");

                switch(columnIndex) {
                    case 0: // marker
                        logger.debug("column 0");
                        EncounterParticipant current = view.getCurrentParticipant();
                        if(current == element) {
                            return markerImage;
                        }

                        return null;
View Full Code Here

Examples of org.criticalfailure.torchlight.core.encounter.common.entity.EncounterParticipant

        public String getColumnText(Object element, int columnIndex) {
            logger.debug("get column text: " + columnIndex + ", " + element);

            if(element instanceof EncounterParticipant) {
                logger.debug("element is an encounter participant");
                EncounterParticipant ep = (EncounterParticipant)element;

                switch(columnIndex) {
                    case 0: // marker
                        return null;

                    case 1: // order
                        logger.debug("column 1");

                        return String.valueOf(ep.getOrder());

                    case 2: // name
                        logger.debug("column 2");
                        return ((EncounterParticipant)element).getLabel();

                    case 3: // badges
                        logger.debug("column 3");

                        // TODO

                        break;

                    case 4: // target
                        logger.debug("column 4");

                        Object target = ep.getTarget();
                        logger.trace("target: " + target);

                        if(target instanceof EncounterParticipant) {
                            logger.debug("target is an encounter participant");
                            return ((EncounterParticipant)target).getLabel();
                        }
                        else if(target instanceof String) {
                            return (String)target;
                        }

                        return null;

                    case 5: // notes
                        logger.debug("column 5");

                        return ep.getNotes();
                }
            }

            return null;
        }
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.