Package org.openfaces.component.timetable

Examples of org.openfaces.component.timetable.TimetableView


        List<String> viewIds = new ArrayList<String>();
        for (UIComponent c : layeredPane.getChildren()) {
            SubPanel subPanel = (SubPanel) c;
            if (subPanel.getChildCount() != 1) throw new IllegalStateException();
            VirtualContainer container = (VirtualContainer) subPanel.getChildren().get(0);
            TimetableView timetableView = (TimetableView) container.getVirtualChild();
            String viewId = timetableView.getClientId(context);
            viewIds.add(viewId);
        }

        Rendering.renderInitScript(context, new ScriptBuilder().initScript(context, timetable, "O$.Timetable._init",
                layeredPane,
View Full Code Here


        for (int i = 0, count = children.size(); i < count; i++) {
            SubPanel subPanel = (SubPanel) children.get(i);
            if (subPanel.getChildCount() != 1)
                throw new IllegalArgumentException("One child component expected, but was " + subPanel.getChildCount() + "; panel index: " + i);
            VirtualContainer container = (VirtualContainer) subPanel.getChildren().get(0);
            TimetableView viewInThisPanel = (TimetableView) container.getVirtualChild();
            Timetable.ViewType viewTypeType = viewInThisPanel.getType();
            if (viewTypeType == currentViewType) {
                viewIndex = i;
                break;
            }
View Full Code Here

        writer.startElement("div", actionBar);
        String clientId = actionBar.getClientId(context);
        writer.writeAttribute("id", clientId, null);
        Rendering.writeStandardEvents(writer, actionBar);

        TimetableView timeTable = (TimetableView) actionBar.getParent();
        if (!(timeTable instanceof MonthTable)) {
            writer.writeText(actionBar.getNoteText(), null);
        }
        writer.endElement("div");

        String userSpecifiedStyle = Styles.getCSSClass(context, actionBar, actionBar.getStyle(), actionBar.getStyleClass());
        JSONArray eventActions = getEventActions(context, actionBar);
        double actionRolloverBackgroundIntensity = actionBar.getActionRolloverBackgroundIntensity();
        double actionPressedBackgroundIntensity = actionBar.getActionPressedBackgroundIntensity();
        Rendering.renderInitScript(context, new ScriptBuilder().initScript(context, actionBar, "O$.Timetable._initEventActionBar",
                actionBar.getBackgroundIntensity(),
                userSpecifiedStyle,
                eventActions,
                actionRolloverBackgroundIntensity,
                actionPressedBackgroundIntensity));
        Styles.renderStyleClasses(context, actionBar);

        Confirmation confirmation = timeTable.getDeletionConfirmation();

        if (confirmation != null && confirmation.isRendered())
            confirmation.encodeAll(context);
    }
View Full Code Here

            if (component.isRendered())
                result.add((EventAction) component);
            if (component instanceof DeleteEventAction)
                deleteEventAction = (DeleteEventAction) component;
        }
        TimetableView timeTable = (TimetableView) actionBar.getParent();
        boolean tableEditable = timeTable.isEditable();
        if (tableEditable) {
            if (deleteEventAction == null) {
                deleteEventAction = Components.createComponent(context,
                        DeleteEventAction.COMPONENT_TYPE, DeleteEventAction.class, actionBar, "deleteEventAction");
                result.add(deleteEventAction);
                actionBar.getChildren().add(deleteEventAction);
            }
            deleteEventAction.setOnclick("O$.Timetable._deleteCurrentTimetableEvent(event)");
            Confirmation confirmation = timeTable.getDeletionConfirmation();

            if (confirmation != null) {
                if (deleteEventAction.isRendered() && deleteEventAction.getShowConfirmation()) {
                    confirmation.setRendered(true);
                    if (deleteEventAction.getId() == null)
View Full Code Here

            SubPanel subPanel = (SubPanel) children.get(i);
            if (subPanel.getChildCount() != 1)
                throw new IllegalArgumentException("One child component expected, but was " + subPanel.getChildCount() + "; panel index: " + i);
            AbstractSwitcher viewInThisPanel = (AbstractSwitcher) subPanel.getChildren().get(0);
            Timetable.ViewType viewType = viewInThisPanel.getApplicableViewType();
            TimetableView appropriateView = timetable.getViewByType(viewType);
            viewInThisPanel.setFor(":" + appropriateView.getClientId(context));
            if (viewType == currentViewType) {
                viewIndex = i;
            }

        }
View Full Code Here

public class EventAreaRenderer extends RendererBase {

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        EventArea eventArea = (EventArea) component;
        TimetableView parent = (TimetableView) eventArea.getParent();

        AbstractTimetableEvent event = parent.getEvent();

        if (!(event instanceof TimetableEvent))
            return;
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement("div", eventArea);
View Full Code Here

    }

    @Override
    protected void encodeCustomContent(FacesContext context, PopupLayer popupLayer) throws IOException {
        final EventEditorDialog dialog = (EventEditorDialog) popupLayer;
        final TimetableView timetableView = (TimetableView) dialog.getParent();
        TimetableEditingOptions editingOptions = timetableView.getEditingOptions();
        final boolean useResourceSeparationMode = (Boolean) timetableView.getAttributes().
                get(TimeScaleTableRenderer.USE_RESOURCE_SEPARATION_MODE_ATTR) && (editingOptions != null && editingOptions.isEventResourceEditable());
        final boolean eventDurationEditable = (editingOptions != null && editingOptions.isEventDurationEditable());
        final UIComponent[][] components = new UIComponent[][]{
                {
                        createLabelComponent(context, dialog, "nameLabel", dialog.getNameLabel()),
View Full Code Here

        AbstractSwitcher switcher = (AbstractSwitcher) component;

        Locale locale = switcher.getLocale();
        Rendering.registerDateTimeFormatObject(locale);

        TimetableView timetableView = switcher.getTimetableView();
        TimeZone timeZone = switcher.getTimeZone();

        SimpleDateFormat dateFormat = CalendarUtil.getSimpleDateFormat(switcher.getDateFormat(),
                DEFAULT_DATE_FORMAT, getPattern(switcher), null, locale, timeZone);
        String pattern = dateFormat.toPattern();
View Full Code Here

TOP

Related Classes of org.openfaces.component.timetable.TimetableView

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.