Use correct color for thrust axis labels
This commit is contained in:
parent
b861e3b704
commit
1c73621899
@ -47,6 +47,7 @@ class MotorInformationPanel extends JPanel {
|
|||||||
private static Color NO_COMMENT_COLOR;
|
private static Color NO_COMMENT_COLOR;
|
||||||
private static Color WITH_COMMENT_COLOR;
|
private static Color WITH_COMMENT_COLOR;
|
||||||
private static Color textColor;
|
private static Color textColor;
|
||||||
|
private static Color dimTextColor;
|
||||||
private static Border border;
|
private static Border border;
|
||||||
|
|
||||||
// Motors in set
|
// Motors in set
|
||||||
@ -103,7 +104,7 @@ class MotorInformationPanel extends JPanel {
|
|||||||
this.add(totalImpulseLabel, "split");
|
this.add(totalImpulseLabel, "split");
|
||||||
|
|
||||||
classificationLabel = new JLabel();
|
classificationLabel = new JLabel();
|
||||||
classificationLabel.setEnabled(false); // Gray out
|
classificationLabel.setForeground(dimTextColor);
|
||||||
this.add(classificationLabel, "gapleft unrel, wrap");
|
this.add(classificationLabel, "gapleft unrel, wrap");
|
||||||
|
|
||||||
//// Avg. thrust:
|
//// Avg. thrust:
|
||||||
@ -194,8 +195,8 @@ class MotorInformationPanel extends JPanel {
|
|||||||
// Add the data and formatting to the plot
|
// Add the data and formatting to the plot
|
||||||
XYPlot plot = chart.getXYPlot();
|
XYPlot plot = chart.getXYPlot();
|
||||||
|
|
||||||
changeLabelFont(plot.getRangeAxis(), -2);
|
changeLabelFont(plot.getRangeAxis(), -2, textColor);
|
||||||
changeLabelFont(plot.getDomainAxis(), -2);
|
changeLabelFont(plot.getDomainAxis(), -2, textColor);
|
||||||
|
|
||||||
//// Thrust curve:
|
//// Thrust curve:
|
||||||
TextTitle title = new TextTitle(trans.get("TCMotorSelPan.title.Thrustcurve"), this.getFont());
|
TextTitle title = new TextTitle(trans.get("TCMotorSelPan.title.Thrustcurve"), this.getFont());
|
||||||
@ -257,6 +258,7 @@ class MotorInformationPanel extends JPanel {
|
|||||||
NO_COMMENT_COLOR = GUIUtil.getUITheme().getDimTextColor();
|
NO_COMMENT_COLOR = GUIUtil.getUITheme().getDimTextColor();
|
||||||
WITH_COMMENT_COLOR = GUIUtil.getUITheme().getTextColor();
|
WITH_COMMENT_COLOR = GUIUtil.getUITheme().getTextColor();
|
||||||
textColor = GUIUtil.getUITheme().getTextColor();
|
textColor = GUIUtil.getUITheme().getTextColor();
|
||||||
|
dimTextColor = GUIUtil.getUITheme().getDimTextColor();
|
||||||
border = GUIUtil.getUITheme().getBorder();
|
border = GUIUtil.getUITheme().getBorder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,10 +374,11 @@ class MotorInformationPanel extends JPanel {
|
|||||||
comment.setCaretPosition(0);
|
comment.setCaretPosition(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void changeLabelFont(ValueAxis axis, float size) {
|
void changeLabelFont(ValueAxis axis, float size, Color color) {
|
||||||
Font font = axis.getTickLabelFont();
|
Font font = axis.getTickLabelFont();
|
||||||
font = font.deriveFont(font.getSize2D() + size);
|
font = font.deriveFont(font.getSize2D() + size);
|
||||||
axis.setTickLabelFont(font);
|
axis.setTickLabelFont(font);
|
||||||
|
axis.setTickLabelPaint(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user