/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2009 Sun Microsystems, Inc.
*/
/**
* The table used to display the tasks.
*
*/
implements Comparator<TaskEntry>
{
{
}
{
}
/**
* The sort column of the table.
*/
/**
* Whether the sorting is ascending or descending.
*/
private boolean sortAscending = true;
/**
* Default constructor.
*/
public TaskTableModel()
{
super();
}
/**
* Sets the data for this table model.
* @param newData the data for this table model.
*/
{
{
}
}
/**
* Updates the table model contents and sorts its contents depending on the
* sort options set by the user.
*/
public void forceResort()
{
}
/**
* Updates the table model contents, sorts its contents depending on the
* sort options set by the user and updates the column structure.
*/
public void forceDataStructureChange()
{
}
/**
* Updates the array data. This includes resorting it.
*/
private void updateDataArray()
{
{
}
}
/**
* Sets the operations displayed by this table model.
* @param attributes the attributes displayed by this table model.
*/
{
{
throw new IllegalArgumentException(
"Some of the provided attributes are not valid.");
}
this.displayedAttributes.clear();
int i = 0;
{
i++;
}
}
/**
* {@inheritDoc}
*/
{
return Message.class;
}
/**
* {@inheritDoc}
*/
return columnNames[col];
}
/**
* {@inheritDoc}
*/
{
switch (column)
{
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
if (taskEntry.isCancelable())
{
}
else
{
}
break;
case 4:
{
} else {
{
}
}
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
{
}
break;
case 9:
break;
case 10:
break;
default:
}
return value;
}
/**
* Returns the row count.
* @return the row count.
*/
public int getRowCount()
{
return dataSourceArray.size();
}
/**
* Returns the column count.
* @return the column count.
*/
public int getColumnCount()
{
return columnNames.length;
}
/**
* Gets the TaskDescriptor in a given row.
* @param row the row.
* @return the TaskDescriptor in a given row.
*/
{
}
/**
* Returns the set of attributes ordered.
* @return the set of attributes ordered.
*/
{
return displayedAttributes;
}
/**
* Returns the set of attributes ordered.
* @return the set of attributes ordered.
*/
{
return allAttributes;
}
/**
* {@inheritDoc}
*/
{
int result;
if (result == 0)
{
for (int i : possibleResults)
{
if (i != 0)
{
result = i;
break;
}
}
}
if (!isSortAscending())
{
}
return result;
}
/**
* Returns whether the sort is ascending or descending.
* @return <CODE>true</CODE> if the sort is ascending and <CODE>false</CODE>
* otherwise.
*/
public boolean isSortAscending()
{
return sortAscending;
}
/**
* Sets whether to sort ascending of descending.
* @param sortAscending whether to sort ascending or descending.
*/
{
this.sortAscending = sortAscending;
}
/**
* Returns the column index used to sort.
* @return the column index used to sort.
*/
public int getSortColumn()
{
return sortColumn;
}
/**
* Sets the column index used to sort.
* @param sortColumn column index used to sort..
*/
{
this.sortColumn = sortColumn;
}
{
int fixedOrderColumn = 0;
int i=0;
{
if (i == column)
{
break;
}
i++;
}
{
{
break;
}
}
return fixedOrderColumn;
}
{
{
msg = valueIfEmpty;
}
else
{
{
}
else
{
}
}
return msg;
}
}