use of com.ramussoft.common.Qualifier in project ramus by Vitaliy-Yakovchuk.
the class TableView method getAttributes.
@Override
protected Attribute[] getAttributes() {
Attribute[] attributes = super.getAttributes();
List<Attribute> attrs = new ArrayList<Attribute>(attributes.length);
TableViewProperties properties = getProperties();
Qualifier q = getQualifier();
int index = -1;
for (int i = 0; i < attributes.length; i++) {
if (attributes[i].getId() == q.getAttributeForName()) {
index = i;
break;
}
}
if (index > 0) {
Attribute a = attributes[index];
attributes[index] = attributes[0];
attributes[0] = a;
}
for (Attribute attribute : attributes) {
if ((!properties.isPresent(attribute)) || (attribute.getId() == q.getAttributeForName())) {
attrs.add(attribute);
}
}
return attrs.toArray(new Attribute[attrs.size()]);
}
use of com.ramussoft.common.Qualifier in project ramus by Vitaliy-Yakovchuk.
the class SelectRowPanel method initialize.
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.add(splitPane, BorderLayout.CENTER);
splitPane.setDividerLocation(250);
ResourceLoader.setJComponentsText(this);
final Qualifier q1 = qualifier;
selectedRows.clear();
createComponents();
if (q1 != null) {
qualifierView.setSelectedQualifier(q1);
}
}
use of com.ramussoft.common.Qualifier in project ramus by Vitaliy-Yakovchuk.
the class SelectRowPanel method selectRows.
public void selectRows(List<Row> rows) {
selectedRows.clear();
if (selectableTableView != null)
selectableTableView.clearSelection();
List<Long> ss = new ArrayList<Long>();
for (Row row : rows) {
Qualifier qualifier = row.getRowSet().getQualifier();
List<Row> sels = getSelectedRows(qualifier);
sels.add(row);
if (this.qualifier != null && this.selectableTableView != null && this.qualifier.equals(qualifier))
ss.add(row.getElementId());
}
if (selectableTableView != null)
selectableTableView.selectRows(ss);
repaint();
}
use of com.ramussoft.common.Qualifier in project ramus by Vitaliy-Yakovchuk.
the class OwnerClasificators method updateOuners.
public void updateOuners() {
List<Qualifier> cls = dataPlugin.getEngine().getQualifiers();
for (int i = cls.size() - 1; i >= 0; i--) {
if (IDEF0Plugin.isFunction(cls.get(i)))
cls.remove(i);
}
Collections.sort(cls, new Comparator<Qualifier>() {
Collator collator = Collator.getInstance();
@Override
public int compare(Qualifier o1, Qualifier o2) {
return collator.compare(o1.getName(), o2.getName());
}
});
cls.remove(dataPlugin.getBaseFunction());
clasificators = cls.toArray(new Qualifier[cls.size()]);
String s = dataPlugin.getProperty(DataPlugin.PROPERTY_OUNERS);
if (s == null)
s = "";
final StringTokenizer st = new StringTokenizer(s, " ");
while (st.hasMoreElements()) {
owners.add(Long.parseLong(st.nextToken()));
}
model.fireTableDataChanged();
}
use of com.ramussoft.common.Qualifier in project ramus by Vitaliy-Yakovchuk.
the class XMLReportEngine method checkReportAttributes.
public void checkReportAttributes() {
if (processReportAttributes) {
processReportAttributes = false;
String br = attributes.get("BaseRow");
if (br != null) {
long id = Long.parseLong(br);
Qualifier qualifier = data.getQualifier(id);
if (qualifier == null)
attributes.remove("BaseRow");
}
/*String model = attributes.get("ReportFunction");
if (model != null) {
Qualifier qualifier = data.getEngine()
.getQualifierByName(model);
if (qualifier == null)
attributes.remove("ReportFunction");
}*/
}
}
Aggregations