📄 styleregion.java
字号:
);
StyleRegion b = new StyleRegion(style, r2 + 1, c1, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
return result;
}
/**
* Returns non-intersecting regions for case 4.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect4RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(style, this.startRow, c2 + 1, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
return result;
}
/**
* Returns non-intersecting regions for case 5.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect5RegionList(int r1, int c1, int r2, int c2) {
return new ArrayList();
}
/**
* Returns non-intersecting regions for case 6.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect6RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(
style, this.startRow, this.startColumn, this.endRow, c1 - 1
);
ArrayList result = new ArrayList();
result.add(a);
return result;
}
/**
* Returns non-intersecting regions for case 7.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect7RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(style, this.startRow, this.startColumn, r1 - 1, c2);
StyleRegion b = new StyleRegion(style, this.startRow, c2 + 1, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
return result;
}
/**
* Returns non-intersecting regions for case 8.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect8RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(
style, this.startRow, this.startColumn, r1 - 1, this.endColumn
);
ArrayList result = new ArrayList();
result.add(a);
return result;
}
/**
* Returns non-intersecting regions for case 9.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect9RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(
style, this.startRow, this.startColumn, this.endRow, c1 - 1
);
StyleRegion b = new StyleRegion(style, this.startRow, c1, r1 - 1, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
return result;
}
/**
* Returns non-intersecting regions for case 10.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect10RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(
style, this.startRow, this.startColumn, this.endRow, c1 - 1
);
StyleRegion b = new StyleRegion(style, r2 + 1, c1, this.endRow, c2);
StyleRegion c = new StyleRegion(style, this.startRow, c2 + 1, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
result.add(c);
return result;
}
/**
* Returns non-intersecting regions for case 11.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect11RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(
style, this.startRow, this.startColumn, this.endRow, c1 - 1
);
StyleRegion b = new StyleRegion(style, this.startRow, c1, r1 - 1, this.endColumn);
StyleRegion c = new StyleRegion(style, r2 + 1, c1, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
result.add(c);
return result;
}
/**
* Returns non-intersecting regions for case 12.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect12RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(style, this.endRow, this.startColumn, this.endRow, c1 - 1);
StyleRegion b = new StyleRegion(style, this.startRow, c1, r1 - 1, c2);
StyleRegion c = new StyleRegion(style, this.startRow, c2 + 1, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
result.add(c);
return result;
}
/**
* Returns non-intersecting regions for case 13.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect13RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(style, this.startRow, this.startColumn, r1 - 1, c2);
StyleRegion b = new StyleRegion(style, this.startRow, c2 + 1, this.endRow, this.endColumn);
StyleRegion c = new StyleRegion(style, r2 + 1, this.startColumn, this.endRow, c2);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
result.add(c);
return result;
}
/**
* Returns non-intersecting regions for case 14.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect14RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(
style, this.startRow, this.startColumn, this.endRow, c1 - 1
);
StyleRegion b = new StyleRegion(style, this.startRow, c1, r1 - 1, c2);
StyleRegion c = new StyleRegion(style, r2 + 1, c1, this.endRow, c2);
StyleRegion d = new StyleRegion(style, this.startRow, c2 + 1, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
result.add(c);
result.add(d);
return result;
}
/**
* Returns non-intersecting regions for case 15.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect15RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(
style, this.startRow, this.startColumn, this.endRow, c1 - 1
);
StyleRegion b = new StyleRegion(style, this.startRow, c2 + 1, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
return result;
}
/**
* Returns non-intersecting regions for case 16.
*
* @param r1 the start row for the intersecting region.
* @param c1 the start column for the intersecting region.
* @param r2 the end row for the intersecting region.
* @param c2 the end column for the intersecting region.
*
* @return A list of non-intersecting regions.
*/
private List getNonIntersect16RegionList(int r1, int c1, int r2, int c2) {
StyleRegion a = new StyleRegion(
style, this.startRow, this.startColumn, r1 - 1, this.endColumn
);
StyleRegion b = new StyleRegion(
style, r2 + 1, this.startColumn, this.endRow, this.endColumn
);
ArrayList result = new ArrayList();
result.add(a);
result.add(b);
return result;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -