Class CommonApp<Solution_>
- java.lang.Object
-
- ai.timefold.solver.examples.common.app.LoggingMain
-
- ai.timefold.solver.examples.common.app.CommonApp<Solution_>
-
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotation
- Direct Known Subclasses:
CloudBalancingApp,ConferenceSchedulingApp,CurriculumCourseApp,ExaminationApp,FlightCrewSchedulingApp,MachineReassignmentApp,MeetingSchedulingApp,NQueensApp,NurseRosteringApp,PatientAdmissionScheduleApp,ProjectJobSchedulingApp,TaskAssigningApp,TennisApp,TravelingTournamentApp,TspApp,VehicleRoutingApp
public abstract class CommonApp<Solution_> extends LoggingMain
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCommonApp.ExtraAction<Solution_>
-
Field Summary
Fields Modifier and Type Field Description static StringDATA_DIR_SYSTEM_PROPERTYThe path to the data directory, preferably with unix slashes for portability.protected StringdataDirNameprotected Stringdescriptionprotected StringiconResourceprotected Stringnameprotected SolutionBusiness<Solution_,?>solutionBusinessprotected SolverAndPersistenceFrame<Solution_>solverAndPersistenceFrameprotected StringsolverConfigResource-
Fields inherited from class ai.timefold.solver.examples.common.app.LoggingMain
logger
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected CommonApp.ExtraAction<Solution_>[]createExtraActions()SolutionBusiness<Solution_,?>createSolutionBusiness()protected Set<AbstractSolutionExporter<Solution_>>createSolutionExporters()abstract SolutionFileIO<Solution_>createSolutionFileIO()Used for the unsolved and solved directories, not for the import and output directories, in the data directory.protected Set<AbstractSolutionImporter<Solution_>>createSolutionImporters()protected abstract SolutionPanel<Solution_>createSolutionPanel()static FiledetermineDataDir(String dataDirName)StringgetDataDirName()StringgetDescription()StringgetIconResource()StringgetName()StringgetSolverConfigResource()voidinit()voidinit(Component centerForComponent, boolean exitOnClose)static voidprepareSwingEnvironment()Some examples are not compatible with every native LookAndFeel.
-
-
-
Field Detail
-
DATA_DIR_SYSTEM_PROPERTY
public static final String DATA_DIR_SYSTEM_PROPERTY
The path to the data directory, preferably with unix slashes for portability. For example: -D"ai.timefold.solver.examples.dataDir"=sources/data/- See Also:
- Constant Field Values
-
name
protected final String name
-
description
protected final String description
-
solverConfigResource
protected final String solverConfigResource
-
dataDirName
protected final String dataDirName
-
iconResource
protected final String iconResource
-
solverAndPersistenceFrame
protected SolverAndPersistenceFrame<Solution_> solverAndPersistenceFrame
-
solutionBusiness
protected SolutionBusiness<Solution_,?> solutionBusiness
-
-
Method Detail
-
prepareSwingEnvironment
public static void prepareSwingEnvironment()
Some examples are not compatible with every native LookAndFeel. For example, NurseRosteringPanel is incompatible with Mac.
-
getName
public String getName()
-
getDescription
public String getDescription()
-
getSolverConfigResource
public String getSolverConfigResource()
-
getDataDirName
public String getDataDirName()
-
getIconResource
public String getIconResource()
-
init
public void init()
-
init
public void init(Component centerForComponent, boolean exitOnClose)
-
createSolutionBusiness
public SolutionBusiness<Solution_,?> createSolutionBusiness()
-
createSolutionPanel
protected abstract SolutionPanel<Solution_> createSolutionPanel()
-
createExtraActions
protected CommonApp.ExtraAction<Solution_>[] createExtraActions()
-
createSolutionFileIO
public abstract SolutionFileIO<Solution_> createSolutionFileIO()
Used for the unsolved and solved directories, not for the import and output directories, in the data directory.- Returns:
- never null
-
createSolutionImporters
protected Set<AbstractSolutionImporter<Solution_>> createSolutionImporters()
-
createSolutionExporters
protected Set<AbstractSolutionExporter<Solution_>> createSolutionExporters()
-
-