reservationcontroller.java

来自「Rapla是一个灵活的多用户资源管理系统。它提供的一些功能有:日历GUI」· Java 代码 · 共 54 行

JAVA
54
字号
package org.rapla.gui;

import java.awt.Component;
import java.awt.Point;
import java.util.Date;

import org.rapla.entities.domain.Allocatable;
import org.rapla.entities.domain.Appointment;
import org.rapla.entities.domain.Reservation;
import org.rapla.framework.RaplaException;

/** Use the ReservationController to modify or create a {@link Reservation}.
    This class handles all interactions with the user. Examples:
    <li>
    If you edit a reservation it will first check, if there is already is an
    open edit-window for the reservation and will give focus to that window instead of
    creating a new one.
    </li>
    <li>
    If you move or delete an repeating appointment it will display dialogs
    where the user will be asked if he wants to delete/move the complete appointment
    or just the occurance on the selected date.
    </li>
    <li>
    If conflicts are found, a conflict panel will be displayed on saving.
    </li>
 */
public interface ReservationController
{

    public final static String ROLE = ReservationController.class.getName();

    void edit( Reservation reservation ) throws RaplaException;

    void edit( Appointment appointment ) throws RaplaException;

    boolean save(Reservation reservation,Component sourceComponent,boolean showOnlyWhenConflicts) throws RaplaException;

    public ReservationEdit[] getEditWindows();

    /** copys an appointment without interaction */
    Appointment copyAppointment( Appointment appointment ) throws RaplaException;

    void deleteAppointment( Appointment appointment, Date from, Component sourceComponent, Point point )  throws RaplaException;

    Appointment copyAppointment( Appointment appointment, Date from, Component sourceComponent, Point point ) throws RaplaException;

    void pasteAppointment( Appointment appointment, Reservation reservation, Date start, Component sourceComponent, Point point,Allocatable[] restrictedAllocatables, boolean asNewReservation ) throws RaplaException;

    void moveAppointment( Appointment appointment, Date from, Date newStart, Component sourceComponent, Point point ) throws RaplaException;

    void resizeAppointment( Appointment appointment, Date from, Date newStart, Date newEnd, Component sourceComponent, Point p ) throws RaplaException;

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?