Usages of

bizcal.swing.CalendarListener.newEvent(?, ?)
protected CalendarListener listener; // code omitted ... public void mouseClicked(MouseEvent e) { /* ================================================== */ try { if (e.getClickCount() < 2) { /* ------------------------------------------------------- */ // set the lasso area to the clicked cell int lx = findNextSmallerVerticalLine(e.getX()); int ly = findNextSmallerHorizontalLinePos(e.getY()); int lwidth = findNextGreaterVerticalLine(e.getX()) - lx; int lheight = getTimeSlotHeight(); _lassoArea.setBounds(lx, ly, lwidth, lheight); setSelectionDate(lx + ( lwidth / 2 ), ly); _lassoArea.setVisible(true); /* ------------------------------------------------------- */ } else { /* ------------------------------------------------------- */ // on double click, create a new event /* ------------------------------------------------------- */ // the date is in the range of the lasso area /* ------------------------------------------------------- */ int newY = findNextSmallerHorizontalLinePos(e.getPoint().y); // Date date = getDate( e.getPoint().x, e.getPoint().y); Date date = getDate(e.getPoint().x, newY); Object id = getCalendarId(e.getPoint().x, e.getPoint().y); if (listener == null) return; if (!getModel().isInsertable(id, date)) return; listener.newEvent(id, date); /* ------------------------------------------------------- */ } /* ------------------------------------------------------- */ } catch (Exception exc) { ErrorHandler.handleError(exc); } /* ================================================== */ }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes