Restructered pit-swing to better follow MVC paradigm.

Adding extensibility features for pit-swing.
This commit is contained in:
Jonathan Bernard
2010-03-02 11:59:33 -06:00
parent d77f04f12e
commit a3f9f4b291
8 changed files with 329 additions and 214 deletions

View File

@ -9,6 +9,8 @@ public abstract class Issue {
protected Status status
protected int priority
protected String text
protected Date deliveryDate
protected Date creationDate
Issue(String id, Category c = Category.TASK, Status s = Status.NEW,
int p = 9) {
@ -16,6 +18,8 @@ public abstract class Issue {
this.category = c
this.status = s
this.priority = p
this.creationDate = new Date()
this.deliveryDate = null
}
public String getId() { return id; }
@ -48,6 +52,14 @@ public abstract class Issue {
public void setText(String t) { text = t }
public boolean hasDelivery() { return deliveryDate == null }
public Date getCreationDate() { return creationDate }
public Date getDeliveryDate() { return deliveryDate }
public void setDeliveryDate(Date dd) { deliveryDate = dd }
@Override
public String toString() { return "${id}(${priority}-${status}): ${category} ${title}" }