use of org.omegat.core.segmentation.Rule in project omegat by omegat-org.
the class SegmentationRulesModel method moveRowUp.
/**
* Moves a segmentation rule up an order.
*/
public void moveRowUp(int row) {
Rule rulePrev = rules.remove(row - 1);
rules.add(row, rulePrev);
fireTableRowsUpdated(row - 1, row);
}
use of org.omegat.core.segmentation.Rule in project omegat by omegat-org.
the class SegmentationRulesModel method addRow.
/**
* Adds a new empty segmentation rule.
*/
public int addRow() {
int rows = rules.size();
rules.add(new Rule(false, "\\.", "\\s"));
fireTableRowsInserted(rows, rows);
return rows;
}
use of org.omegat.core.segmentation.Rule in project omegat by omegat-org.
the class SegmentationRulesModel method moveRowDown.
/**
* Moves a segmentation rule down an order.
*/
public void moveRowDown(int row) {
Rule ruleNext = rules.remove(row + 1);
rules.add(row, ruleNext);
fireTableRowsUpdated(row, row + 1);
}
use of org.omegat.core.segmentation.Rule in project omegat by omegat-org.
the class SegmentationRulesModel method moveRowToBottom.
/**
* Moves a segmentation rule to bottom.
*/
public void moveRowToBottom(int row) {
Rule ruleCurrent = rules.remove(row);
rules.add(ruleCurrent);
fireTableRowsUpdated(row, rules.size());
}
use of org.omegat.core.segmentation.Rule in project omegat by omegat-org.
the class SegmentationRulesModel method moveRowFirst.
/**
* Moves a segmentation rule to top.
*/
public void moveRowFirst(int row) {
Rule ruleCurrent = rules.remove(row);
rules.add(0, ruleCurrent);
fireTableRowsUpdated(0, row);
}
Aggregations