Package java.util

Examples of java.util.Calendar$CalendarAccessControlContext


    mSettingsPn.add(new JLabel("(" + mLocalizer.msg("nextDay", "next day")
        + ")"), cc.xy(6, currentRow));
    CaretPositionCorrector.createCorrector(dateEditor.getTextField(), new char[] {':'}, -1);
   
    int minutes;
    Calendar cal = Calendar.getInstance();
    minutes = Settings.propProgramTableStartOfDay.getInt();
    cal.set(Calendar.HOUR_OF_DAY, minutes / 60);
    cal.set(Calendar.MINUTE, minutes % 60);
    mStartOfDayTimeSp.setValue(cal.getTime());
   
   
    minutes = Settings.propProgramTableEndOfDay.getInt();
    cal.set(Calendar.HOUR_OF_DAY, minutes / 60);
    cal.set(Calendar.MINUTE, minutes % 60);
    mEndOfDayTimeSp.setValue(cal.getTime());
   
   
   
    // Table Background ***************************************
    layout.appendRow(RowSpec.decode("pref"));
View Full Code Here


    }
   
    Settings.propColumnWidth.setInt((Integer)mColWidth.getValue());
    Settings.propProgramPanelForegroundColor.setColor(mForegroundColorLb.getColor());

    Calendar cal = Calendar.getInstance();
    cal.setTime((Date) mStartOfDayTimeSp.getValue());
    int minutes = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
    Settings.propProgramTableStartOfDay.setInt(minutes);

    cal.setTime((Date) mEndOfDayTimeSp.getValue());
    minutes = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
    Settings.propProgramTableEndOfDay.setInt(minutes);

    Settings.propProgramTableMouseOver.setBoolean(mMouseOverCb.isSelected());

    Settings.propProgramTableMouseOverColor.setColor(mMouseOverColorLb.getColor());
View Full Code Here

void copyGUIIntoParam() {
    parameter.setValue(0, cal.getCalendar().getTime());
}

void copyParamIntoGUI() {
    Calendar calendar = Calendar.getInstance();
    calendar.setTime((Date)parameter.getValue(0));
    cal.setCalendar(calendar);
}
View Full Code Here

    parameter.setValue(0, fromCal.getCalendar().getTime());
    parameter.setValue(1, toCal.getCalendar().getTime());
}

void copyParamIntoGUI() {
    Calendar calendar = Calendar.getInstance();
    calendar.setTime((Date)parameter.getValue(0));
    fromCal.setCalendar(calendar);

    calendar = Calendar.getInstance();
    calendar.setTime((Date)parameter.getValue(1));
    toCal.setCalendar(calendar);
}
View Full Code Here

    SimpleObj dest = mapper.map(src, SimpleObj.class, mapId);
    assertEquals("wrong value for field1", src.getValue("fieldA"), dest.getField1());
    assertEquals("wrong value for field2", src.getValue("field2"), dest.getField2());
    assertEquals("wrong value for field3", Integer.valueOf("1"), dest.getField3());
    assertEquals("wrong value for field4", Integer.valueOf("2"), dest.getField4());
    Calendar expected = Calendar.getInstance();
    expected.set(2005, 10, 15);
    assertEquals(expected.get(Calendar.YEAR), dest.getField5().get(Calendar.YEAR));
    assertEquals(Calendar.OCTOBER, dest.getField5().get(Calendar.MONTH));
    assertEquals(expected.get(Calendar.DATE), dest.getField5().get(Calendar.DATE));

    // Remap to test bi-directional mapping
    CustomMap remappedSrc = mapper.map(dest, CustomMap.class, mapId);
    assertTrue("remapped src should equal original src", EqualsBuilder.reflectionEquals(src.getMap(), remappedSrc.getMap()));
  }
View Full Code Here

                        throw new DateParseException(ex.getMessage());
                }
            }
        }
        else { // add the year ourselves as not present
            Calendar cal = Calendar.getInstance();
            int year = cal.get(Calendar.YEAR);
            stamp.append(year).append('-').append(field);
            lastModified = parseTimestamp(stamp.toString());
           
            // can't be in the future - must be the previous year
            // add 2 days just to allow for different time zones
            cal.add(Calendar.DATE, 2);
            if (lastModified != null && lastModified.after(cal.getTime())) {
                cal.setTime(lastModified);
                cal.add(Calendar.YEAR, -1);
                lastModified = cal.getTime();
            }
        }
           
        // name of file or dir. Extract symlink if possible
        String name = null;
View Full Code Here

        String month = fields[++index];
        String day = fields[++index];
        String year = fields[++index];
        String time = "00:00";
       
        Calendar cal = Calendar.getInstance();
        if (year.indexOf(':') > 0) {
            time = year;
            year = Integer.toString(cal.get(Calendar.YEAR));
        }
           
        // put together & parse       
        StringBuffer stamp = new StringBuffer(month);
        stamp.append('-');
        stamp.append(day);
        stamp.append('-');
        stamp.append(year);
        stamp.append('-');
        stamp.append(time);
       
        Date lastModified = null;
        try {
            lastModified = dateFormatter.parse(stamp.toString());
        }
        catch (ParseException ex) {
            if (!ignoreDateParseErrors)
                throw new DateParseException(ex.getMessage());
        }
                 
        // can't be in the future - must be the previous year
        // add 2 days just to allow for different time zones
        cal.add(Calendar.DATE, 2);
        if (lastModified != null && lastModified.after(cal.getTime())) {
            cal.setTime(lastModified);
            cal.add(Calendar.YEAR, -1);
            lastModified = cal.getTime();
        }
               
        // we've got to find the starting point of the name.
        String name = raw.trim();
        for (int i = 0; i < MIN_FIELD_COUNT-1; i++) {
View Full Code Here

   * @param days
   * @param count
   * @return
   */
  public static List listHotArticles(int days, int count){
    Calendar cal = Calendar.getInstance();
    DateUtils.resetTime(cal);
    cal.add(Calendar.DATE, -days);
    return executeNamedQuery("LIST_HOT_DIARY2", 0, count,
        new Object[]{DiaryOutlineBean.I_STATUS_NORMAL, cal.getTime(),
        CatalogBean.I_TYPE_OWNER});
  }
View Full Code Here

   * @param days
   * @param count
   * @return
   */
  public static List listHotArticles(int siteid, int days, int count){
    Calendar cal = Calendar.getInstance();
    DateUtils.resetTime(cal);
    cal.add(Calendar.DATE, -days);
    return executeNamedQuery("LIST_HOT_DIARY", 0, count, new Object[] {
        new Integer(siteid), DiaryOutlineBean.I_STATUS_NORMAL,
        cal.getTime(), CatalogBean.I_TYPE_OWNER });   
  }
View Full Code Here

   * @param days
   * @param count
   * @return
   */
  public static List listHotArticlesBefore(int siteid, int days, int count){
    Calendar cal = Calendar.getInstance();
    DateUtils.resetTime(cal);
    cal.add(Calendar.DATE, - days + 1);

    return executeNamedQuery("LIST_HOT_DIARY3", 0, count, new Object[] {
        new Integer(siteid), DiaryOutlineBean.I_STATUS_NORMAL,
        cal.getTime(), CatalogBean.I_TYPE_OWNER });
  }
View Full Code Here

TOP

Related Classes of java.util.Calendar$CalendarAccessControlContext

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.