Package java.text

Examples of java.text.SimpleDateFormat.format()


      }

      String s = TimeFormatter.DATEFORMATS_DESC[curFormat] + suffix;
      SimpleDateFormat temp = new SimpleDateFormat(s
          + (showTime && multiline ? "\nh:mm a" : ""));
      cell.setText(temp.format(date));
    }
  }

  // @see com.aelitis.azureus.ui.common.table.impl.TableColumnImpl#setWidth(int)
  public void setWidth(int width) {
View Full Code Here


        if (maxWidthUsed[i] > width - PADDING) {
          continue;
        }
        SimpleDateFormat temp = new SimpleDateFormat(
            TimeFormatter.DATEFORMATS_DESC[i] + suffix);
        Point newSize = gc.stringExtent(temp.format(date));
        if (newSize.x < width - PADDING) {
          idxFormat = i;
          if (maxWidthUsed[i] < newSize.x) {
            maxWidthUsed[i] = newSize.x;
            maxWidthDate[i] = date;
View Full Code Here

      }
      fontBold = new Font(gc.getDevice(), fontData);
    }
    gc.setFont(fontBold);
    SimpleDateFormat temp = new SimpleDateFormat(format);
    Point newSize = gc.stringExtent(temp.format(date));
    gc.dispose();
    return newSize.x;
  }

  public boolean getShowTime() {
View Full Code Here

    /**
     * Returns a string containing the clientHost, targetHost, and targetPort.
     */
    public String toString() {
        SimpleDateFormat dateFormat = new SimpleDateFormat( "MM/dd/yyyy hh:mm:ss a zzz" );
        return "Connection from: " + clientHost + " to " + targetHost + ":" + targetPort + " Opened: " + dateFormat.format( timeOpened );
    }
}
//EOF
View Full Code Here

      emailForm.set("from", message.getMailFrom());
     
      // set the Date: field on the form bean
      Timestamp messageTimestamp = (Timestamp)message.getMessageDate();
      SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss");
      String date = dateFormatter.format(messageTimestamp);
      emailForm.set("date", date);
     
      // set the Subject: field on the form bean
      emailForm.set("subject", message.getSubject());
     
View Full Code Here

      invoiceForm.set("shippingAddress", invoiceVO.getShipToAddress());
      invoiceForm.set("status", invoiceVO.getStatusName());

      Date invoiceDate = (Date)invoiceVO.getInvoiceDate();
      SimpleDateFormat dateFormatter = new SimpleDateFormat("MMMMM dd, yyyy");
      String formattedDate = dateFormatter.format(invoiceDate);
      invoiceForm.set("date", formattedDate);

      int termID = invoiceVO.getTermId();
      invoiceForm.set("terms", termID+"");
      invoiceForm.set("accountManager", invoiceVO.getAccountManagerName());
View Full Code Here

      dynaForm.set("groupid", (new Integer(groupVO.getGroupID())).toString());
      Date createdDate = groupVO.getCreatedate();
      Date modifiedDate = groupVO.getModifydate();
      // TODO common date formatter
      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMM d, yyyy h:mm a");
      dynaForm.set("create", simpleDateFormat.format(createdDate));
      dynaForm.set("modify", simpleDateFormat.format(modifiedDate));
      dynaForm.set("owner", (new Integer(groupVO.getOwner())).toString());

      ListPreference listPreference = userObject.getListPreference("Individual");
      ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
View Full Code Here

      Date createdDate = groupVO.getCreatedate();
      Date modifiedDate = groupVO.getModifydate();
      // TODO common date formatter
      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMM d, yyyy h:mm a");
      dynaForm.set("create", simpleDateFormat.format(createdDate));
      dynaForm.set("modify", simpleDateFormat.format(modifiedDate));
      dynaForm.set("owner", (new Integer(groupVO.getOwner())).toString());

      ListPreference listPreference = userObject.getListPreference("Individual");
      ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
      ValueListParameters listParameters = (ValueListParameters)request
View Full Code Here

        e.printStackTrace();
      }
    }
   
    SimpleDateFormat temp = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
    Logger.getLogger("azureus2").fatal("Azureus stopped at "+temp.format(new Date()));
    //System.exit(0);  - we don't want to force quit, wait until other threads have completed
    // so that resume data etc is saved....
  }
 
    public static boolean
View Full Code Here

       
        SimpleDateFormat temp = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
       
        UIConst.startTime = new Date();
       
        Logger.getLogger("azureus2").fatal("Azureus started at "+temp.format(UIConst.startTime));
       
        UIConst.setAzureusCore( new_core );
      }

      uis = UIConst.UIS.values().iterator();
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.