|
|
|
@ -95,12 +95,14 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
this.contentPanel = generateLimitContentPanel(partitions); |
|
|
|
|
this.add(contentPanel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
if (partitions.size() > 2) { |
|
|
|
|
this.tailPanel = generateTailPanel(); |
|
|
|
|
this.add(tailPanel, BorderLayout.SOUTH); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.createNewTemplateRunnable = pageModel.getCreateNewTemplateRunnable(); |
|
|
|
|
this.openEmptyTemplateRunnable = pageModel.getOpenEmptyTemplateRunnable(); |
|
|
|
|
|
|
|
|
|
this.add(tailPanel, BorderLayout.SOUTH); |
|
|
|
|
this.repaint(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -293,10 +295,8 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
int roundOffset = 15; |
|
|
|
|
// 画一个圆角
|
|
|
|
|
int fixRoundWidth = getWidth() - rectOffset; |
|
|
|
|
int fixRoundHeight = getHeight() - BORDER_THIN; |
|
|
|
|
g2d.drawRoundRect(strokeOffset, strokeOffset, fixRoundWidth, fixRoundHeight, ARC_DIAMETER, ARC_DIAMETER); |
|
|
|
|
// 画一个直角
|
|
|
|
|
g2d.drawRoundRect(getWidth() - roundOffset, strokeOffset, roundOffset - strokeOffset, getHeight() - BORDER_THIN, 0, 0); |
|
|
|
|
int fixRoundHeight = getHeight() - BORDER_THIN * 2; |
|
|
|
|
g2d.drawRoundRect(BORDER_THIN, BORDER_THIN, fixRoundWidth, fixRoundHeight, ARC_DIAMETER, ARC_DIAMETER); |
|
|
|
|
|
|
|
|
|
g2d.setColor(backColor); |
|
|
|
|
|
|
|
|
@ -306,8 +306,13 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
// 偏左一点的 fixedX
|
|
|
|
|
int fixedX = getWidth() - roundOffset - BORDER_THIN; |
|
|
|
|
// 圆角和直角相交的区域
|
|
|
|
|
int coverWidth = 10; |
|
|
|
|
int coverWidth = 15; |
|
|
|
|
g2d.fillRect(fixedX, BORDER_THIN, coverWidth, coverHeight); |
|
|
|
|
|
|
|
|
|
g2d.setColor(borderColor); |
|
|
|
|
g2d.drawLine(getWidth() / 2, BORDER_THIN, getWidth(), BORDER_THIN); |
|
|
|
|
g2d.drawLine(getWidth() / 2, getHeight() - BORDER_THIN, getWidth(), getHeight() - BORDER_THIN); |
|
|
|
|
g2d.drawLine(getWidth() - strokeOffset, BORDER_THIN, getWidth() - strokeOffset, getHeight() - BORDER_THIN); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -335,6 +340,7 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
Font font = nameLabel.getFont(); |
|
|
|
|
Font newSizeFont = font.deriveFont(font.getStyle(), NAME_LABEL_SIZE); |
|
|
|
|
nameLabel.setFont(newSizeFont); |
|
|
|
|
nameLabel.setPreferredSize(PATH_DIMENSION); |
|
|
|
|
Color nameForeground = nameLabel.getForeground(); |
|
|
|
|
simpleDescPanel.add(nameLabel,BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
@ -450,12 +456,19 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
if (borderColor != null) { |
|
|
|
|
g2d.setColor(borderColor); |
|
|
|
|
g2d.setStroke(new BasicStroke(BORDER_THIN)); |
|
|
|
|
|
|
|
|
|
int borderOffset = BORDER_THIN * 2; |
|
|
|
|
// 画画的笔触需要调整一下
|
|
|
|
|
g2d.drawRoundRect(strokeOffset, strokeOffset, getWidth() - rectOffset, getHeight() - BORDER_THIN, 0, 0); |
|
|
|
|
g2d.drawRoundRect(getWidth() - fixedRoundOffset, strokeOffset, roundOffset - strokeOffset, getHeight() - BORDER_THIN, ARC_DIAMETER, ARC_DIAMETER); |
|
|
|
|
//g2d.drawRoundRect(strokeOffset, strokeOffset, getWidth() - rectOffset, getHeight() - BORDER_THIN, 0, 0);
|
|
|
|
|
g2d.drawRoundRect(BORDER_THIN, BORDER_THIN, getWidth() - borderOffset, getHeight() - borderOffset, ARC_DIAMETER, ARC_DIAMETER); |
|
|
|
|
g2d.setColor(backColor); |
|
|
|
|
int fillWidth = 11; |
|
|
|
|
g2d.fillRect(getWidth() - fixedRoundOffset - BORDER_THIN, BORDER_THIN, fillWidth, getHeight() - BORDER_THIN * 2); |
|
|
|
|
int fillWidth = 15; |
|
|
|
|
g2d.fillRect(0, 0, fillWidth, getHeight()); |
|
|
|
|
|
|
|
|
|
g2d.setColor(borderColor); |
|
|
|
|
g2d.drawLine(BORDER_THIN, BORDER_THIN, fillWidth, BORDER_THIN); |
|
|
|
|
g2d.drawLine(BORDER_THIN, getHeight() - BORDER_THIN, fillWidth, getHeight() - BORDER_THIN); |
|
|
|
|
g2d.drawLine(BORDER_THIN, BORDER_THIN, BORDER_THIN, getHeight() - BORDER_THIN); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|