Package org.drools.planner.examples.examination.domain

Examples of org.drools.planner.examples.examination.domain.Period


            roomListField.setSelectedItem(exam.getRoom());
            listFieldsPanel.add(roomListField);
            int result = JOptionPane.showConfirmDialog(ExaminationPanel.this.getRootPane(), listFieldsPanel,
                    "Select period and room", JOptionPane.OK_CANCEL_OPTION);
            if (result == JOptionPane.OK_OPTION) {
                Period toPeriod = (Period) periodListField.getSelectedItem();
                solutionBusiness.doMove(new PeriodChangeMove(exam, toPeriod));
                Room toRoom = (Room) roomListField.getSelectedItem();
                solutionBusiness.doMove(new RoomChangeMove(exam, toRoom));
                solverAndPersistenceFrame.resetScreen();
            }
View Full Code Here


    public Move createUndoMove(ScoreDirector scoreDirector) {
        return new ExamSwapMove(rightExam, leftExam);
    }

    public void doMove(ScoreDirector scoreDirector) {
        Period oldLeftPeriod = leftExam.getPeriod();
        Period oldRightPeriod = rightExam.getPeriod();
        Room oldLeftRoom = leftExam.getRoom();
        Room oldRightRoom = rightExam.getRoom();
        if (oldLeftPeriod.equals(oldRightPeriod)) {
            ExaminationMoveHelper.moveRoom(scoreDirector, leftExam, oldRightRoom);
            ExaminationMoveHelper.moveRoom(scoreDirector, rightExam, oldLeftRoom);
View Full Code Here

TOP

Related Classes of org.drools.planner.examples.examination.domain.Period

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.