本文整理汇总了Java中com.intellij.uiDesigner.radComponents.RadAbstractGridLayoutManager.getVerticalGridLines方法的典型用法代码示例。如果您正苦于以下问题:Java RadAbstractGridLayoutManager.getVerticalGridLines方法的具体用法?Java RadAbstractGridLayoutManager.getVerticalGridLines怎么用?Java RadAbstractGridLayoutManager.getVerticalGridLines使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.uiDesigner.radComponents.RadAbstractGridLayoutManager
的用法示例。
在下文中一共展示了RadAbstractGridLayoutManager.getVerticalGridLines方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInsertFeedbackPosition
import com.intellij.uiDesigner.radComponents.RadAbstractGridLayoutManager; //导入方法依赖的package包/类
public static Rectangle getInsertFeedbackPosition(final GridInsertMode mode, final RadContainer container, final Rectangle cellRect,
final Rectangle feedbackRect) {
final RadAbstractGridLayoutManager manager = container.getGridLayoutManager();
int[] vGridLines = manager.getVerticalGridLines(container);
int[] hGridLines = manager.getHorizontalGridLines(container);
Rectangle rc = feedbackRect;
int w=4;
switch (mode) {
case ColumnBefore:
rc = new Rectangle(vGridLines [cellRect.x] - w, feedbackRect.y - INSERT_ARROW_SIZE,
2 * w, feedbackRect.height + 2 * INSERT_ARROW_SIZE);
if (cellRect.x > 0 && manager.isGapCell(container, false, cellRect.x-1)) {
rc.translate(-(vGridLines [cellRect.x] - vGridLines [cellRect.x-1]) / 2, 0);
}
break;
case ColumnAfter:
rc = new Rectangle(vGridLines [cellRect.x + cellRect.width+1] - w, feedbackRect.y - INSERT_ARROW_SIZE,
2 * w, feedbackRect.height + 2 * INSERT_ARROW_SIZE);
if (cellRect.x < manager.getGridColumnCount(container)-1 && manager.isGapCell(container, false, cellRect.x+1)) {
rc.translate((vGridLines [cellRect.x+2] - vGridLines [cellRect.x+1]) / 2, 0);
}
break;
case RowBefore:
rc = new Rectangle(feedbackRect.x - INSERT_ARROW_SIZE, hGridLines [cellRect.y] - w,
feedbackRect.width + 2 * INSERT_ARROW_SIZE, 2 * w);
if (cellRect.y > 0 && manager.isGapCell(container, true, cellRect.y-1)) {
rc.translate(0, -(hGridLines [cellRect.y] - hGridLines [cellRect.y-1]) / 2);
}
break;
case RowAfter:
rc = new Rectangle(feedbackRect.x - INSERT_ARROW_SIZE, hGridLines [cellRect.y+cellRect.height+1] - w,
feedbackRect.width + 2 * INSERT_ARROW_SIZE, 2 * w);
if (cellRect.y < manager.getGridRowCount(container)-1 && manager.isGapCell(container, true, cellRect.y+1)) {
rc.translate(0, (hGridLines [cellRect.y+2] - hGridLines [cellRect.y+1]) / 2);
}
break;
}
return rc;
}