Examples of JXMonthView


Examples of org.jdesktop.swingx.JXMonthView

        .getInstance();
    DefaultDateSelectionModel dsm = new DefaultDateSelectionModel();
    calB.add(Calendar.MONTH, -1200);
    dsm.setLowerBound(calB.getTime());
    dsm.setUpperBound(calE.getTime());
    JXMonthView mv = new JXMonthView(new Date(), dsm, null);
    // mv.setPreferredRows(1);
    // mv.setPreferredCols(2);
    mv.setTraversable(true);
    dpGebDat.setDate(now.getTime());
    dpGebDat.setMonthView(mv);
  }
View Full Code Here

Examples of org.jdesktop.swingx.JXMonthView

        JXPanel calendar = new JXPanel();
        calendar.setBackground(Color.WHITE);
        Painter<?> painter = createBackgroundPainter();
        calendar.setBackgroundPainter(painter);

        JXMonthView monthView = new JXMonthView();
        Calendar cal = monthView.getCalendar();
        cal.set(Calendar.YEAR, 2010);
        cal.set(Calendar.MONTH, Calendar.JANUARY);
        monthView.setFirstDisplayedDay(cal.getTime());
        monthView.setOpaque(false);
        monthView.setPreferredColumnCount(3);
        monthView.setPreferredRowCount(4);
        // old style: set visual property with JXMonthView api
        monthView.setDayForeground(Calendar.SUNDAY, Color.MAGENTA);
        // <snip> Custom CalendarRenderingHandler
        // new style: install a custom renderingHandler
        // (as client property, because no public api support yet)
        // which allows to add Highlighters
        monthView.putClientProperty(DemoMonthViewUI.RENDERING_HANDLER_KEY,
                createRenderingHandler());
        // </snip>
        DemoUtils.setSnippet("Custom CalendarRenderingHandler", monthView);
        calendar.add(monthView);
        calendarFrame.add(calendar);
View Full Code Here

Examples of org.jdesktop.swingx.JXMonthView

//--------------------- create ui
   

    private void createMonthViewDemo() {
        monthView = new JXMonthView(){

            @Override
            public void setZoomable(boolean zoomable) {
                super.setZoomable(zoomable);
                ((JComponent) getParent()).revalidate();
View Full Code Here

Examples of org.jdesktop.swingx.JXMonthView

//--------------------- create ui
   

    private void createMonthViewDemo() {
        monthView = new JXMonthView();
        monthView.setName("monthView");
       
        // add to container which doesn't grow the size beyond the pref
        JComponent monthViewContainer = new JXPanel();
        monthViewContainer.add(monthView);
View Full Code Here

Examples of org.jdesktop.swingx.JXMonthView

                return;
            }

            // Retarget mouse event to the month view.
            if (_forwardReleaseEvent) {
                JXMonthView monthView = datePicker.getMonthView();
                ev = SwingUtilities.convertMouseEvent(popupButton, ev,
                        monthView);
                monthView.dispatchEvent(ev);
                _forwardReleaseEvent = false;
            }
        }
View Full Code Here

Examples of org.jdesktop.swingx.JXMonthView

            if (!popup.isShowing()) {
                return;
            }

            // Retarget mouse event to the month view.
            JXMonthView monthView = datePicker.getMonthView();
            ev = SwingUtilities.convertMouseEvent(popupButton, ev, monthView);
            monthView.dispatchEvent(ev);
        }
View Full Code Here

Examples of org.jdesktop.swingx.JXMonthView

    public void addActionListener(ActionListener actionListener) {
        datePicker.addActionListener(actionListener);
    }

    private void applyUIStyle() {
        JXMonthView monthView = this.datePicker.getMonthView();
        monthView.setMonthStringBackground(backgroundColor);
        monthView.setMonthStringForeground(monthForegroundColor);
        monthView.setSelectionBackground(selectionBackgroundColor);
        monthView.setSelectionForeground(selectionForegroundColor);
        monthView.setDaysOfTheWeekForeground(dayOfTheWeekForegroundColor);
        monthView.setBackground(backgroundColor);
        monthView.setForeground(foregroundColor);
        monthView.setTodayBackground(todayBackgroundColor);
    }
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.