Skip to content

Commit

Permalink
Add constants for geometry labels
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Dec 2, 2023
1 parent 2bde55f commit 7d852cc
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class AppStrings {

public static final String GEOM_LABEL_A = "A";
public static final String GEOM_LABEL_B = "B";
public static final String GEOM_LABEL_RESULT = "Result";

public static final String TAB_LABEL_LOG = "Log";
public static final String TAB_LABEL_VALUE = "Value";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void jbInit() throws Exception {
jLabel1.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel1.setForeground(AppColors.A);
jLabel1.setToolTipText("");
jLabel1.setText("A");
jLabel1.setText(AppStrings.GEOM_LABEL_A);
jPanel1.setLayout(gridBagLayout2);
btnLoad.setToolTipText("");
btnLoad.setText("Load");
Expand All @@ -101,7 +101,7 @@ public void actionPerformed(ActionEvent e) {
});
jLabel2.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel2.setForeground(AppColors.B);
jLabel2.setText("B");
jLabel2.setText(AppStrings.GEOM_LABEL_B);
lblError.setToolTipText("");
txtError.setLineWrap(true);
txtError.setBorder(BorderFactory.createEtchedBorder());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void jbInit() throws Exception {
jPanel1.setLayout(gridBagLayout2);
jLabel14.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel14.setForeground(AppColors.A);
jLabel14.setText("A");
jLabel14.setText(AppStrings.GEOM_LABEL_A);
jLabel13.setFont(new java.awt.Font("Dialog", 2, 12));
jLabel13.setForeground(AppColors.A);
jLabel13.setText("Ext");
Expand All @@ -289,24 +289,24 @@ void jbInit() throws Exception {
txtAB.setHorizontalAlignment(SwingConstants.LEFT);
jLabel23.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel23.setForeground(AppColors.B);
jLabel23.setText("B");
jLabel23.setText(AppStrings.GEOM_LABEL_B);
relateBI.setFont(new java.awt.Font("Dialog", 1, 12));
relateBI.setText("F");
jLabel22.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel22.setForeground(AppColors.A);
jLabel22.setToolTipText("");
jLabel22.setText("A");
jLabel22.setText(AppStrings.GEOM_LABEL_A);
relateEI.setFont(new java.awt.Font("Dialog", 1, 12));
relateEI.setText("F");
jLabel21.setToolTipText("");
jLabel21.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel21.setForeground(AppColors.A);
jLabel21.setToolTipText("");
jLabel21.setText("A");
jLabel21.setText(AppStrings.GEOM_LABEL_A);
jLabel20.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel20.setForeground(AppColors.B);
jLabel20.setToolTipText("");
jLabel20.setText("B");
jLabel20.setText(AppStrings.GEOM_LABEL_B);
relateBE.setFont(new java.awt.Font("Dialog", 1, 12));
relateBE.setText("F");
relateEE.setFont(new java.awt.Font("Dialog", 1, 12));
Expand All @@ -332,7 +332,7 @@ void jbInit() throws Exception {
jLabel8.setText("Int");
jLabel7.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel7.setForeground(AppColors.B);
jLabel7.setText("B");
jLabel7.setText(AppStrings.GEOM_LABEL_B);
relateII.setBackground(Color.white);
relateII.setFont(new java.awt.Font("Dialog", 1, 12));
relateII.setText("F");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ void rbGML_actionPerformed(ActionEvent e) {
private void writeView(String a, String b, String result)
{
txtGeomView.setText("");
writeViewGeometry("A", a);
writeViewGeometry("B", b);
writeViewGeometry("Result", result);
writeViewGeometry(AppStrings.GEOM_LABEL_A, a);
writeViewGeometry(AppStrings.GEOM_LABEL_B, b);
writeViewGeometry(AppStrings.GEOM_LABEL_RESULT, result);
}

private void writeViewGeometry(String tag, String str)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ public void actionPerformed(ActionEvent e) {
});

rbA.setSelected(true);
rbA.setText("A");
rbA.setText(AppStrings.GEOM_LABEL_A);
rbA.setForeground(AppColors.A);
rbB.setText("B");
rbB.setText(AppStrings.GEOM_LABEL_B);
rbB.setForeground(AppColors.B);
rbResult.setText("Result");
rbResult.setText(AppStrings.GEOM_LABEL_RESULT);

rbA.addItemListener(new ItemListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ public void actionPerformed(ActionEvent e) {

aLabel.setFont(new java.awt.Font("Dialog", 1, 16));
aLabel.setForeground(AppColors.A);
aLabel.setText("A");
aLabel.setText(AppStrings.GEOM_LABEL_A);
aLabel.setPreferredSize(new Dimension(20, 20));
aLabel.setHorizontalTextPosition(SwingConstants.LEFT);

bLabel.setFont(new java.awt.Font("Dialog", 1, 16));
bLabel.setForeground(AppColors.B);
bLabel.setText("B");
bLabel.setText(AppStrings.GEOM_LABEL_B);
bLabel.setPreferredSize(new Dimension(20, 20));

aScrollPane.setBorder(BorderFactory.createLoweredBevelBorder());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jtstest.testbuilder.AppStrings;
import org.locationtech.jtstest.testbuilder.geom.ComponentLocater;
import org.locationtech.jtstest.testbuilder.geom.GeometryLocation;
import org.locationtech.jtstest.testbuilder.geom.SegmentExtracter;
Expand Down Expand Up @@ -51,9 +52,9 @@ public LayerList()
}

void initFixed() {
layers.add(new Layer("A"));
layers.add(new Layer("B"));
layers.add(new Layer("Result"));
layers.add(new Layer(AppStrings.GEOM_LABEL_A));
layers.add(new Layer(AppStrings.GEOM_LABEL_B));
layers.add(new Layer(AppStrings.GEOM_LABEL_RESULT));
}

public int size() { return layers.size(); }
Expand Down

0 comments on commit 7d852cc

Please sign in to comment.