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