Skip to content

Commit

Permalink
font size
Browse files Browse the repository at this point in the history
  • Loading branch information
michael committed Oct 16, 2018
1 parent c9c255e commit 661fb70
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 31 deletions.
4 changes: 3 additions & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="test" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand Down
2 changes: 2 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
Expand All @@ -9,4 +10,5 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.7
11 changes: 2 additions & 9 deletions src/main/java/gui/VennMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import gui.configdialog.elements.CDialogZoom;
import gui.sidemenu.VennMakerSideMenu;
import gui.utilities.StringUtilities;
import gui.utilities.VennMakerUIConfig;
import interview.InterviewController;
import interview.InterviewLayer;
import interview.elements.alter.AlterMultiAttributeOneActorElement;
Expand Down Expand Up @@ -2567,20 +2568,12 @@ public static void main(String[] args)

loadPlugins();

// -------------------------

/*
* Testzeitraum einstellen und das Einschraenkunglevel einstellen.
*/
//TestVersion.setTime(VERSION, "2017-01-01 00:00:00.1");
//TestVersion.setLogoON();
// TestVersion.setExportOFF();

try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
// UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
setUIFont (new javax.swing.plaf.FontUIResource("Sans_Serif",Font.PLAIN, 12));
setUIFont (new javax.swing.plaf.FontUIResource("Sans_Serif",Font.PLAIN, (int) VennMakerUIConfig.getFontSize()));

} catch (ClassNotFoundException exn)
{
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/gui/admin/VariableDefinitonDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import java.awt.Dimension;
import java.awt.Toolkit;

import gui.utilities.VennMakerUIConfig;

/**
*
*
Expand Down Expand Up @@ -52,7 +54,7 @@ private void initComponents() {
jXPanel1.setPreferredSize(new java.awt.Dimension(800, 600));

jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Question"));
jPanel4.setFont(jPanel4.getFont().deriveFont((float)10));
jPanel4.setFont(jPanel4.getFont().deriveFont(VennMakerUIConfig.getFontSize()));

jXLabel1.setText("Related question ");

Expand All @@ -77,7 +79,7 @@ private void initComponents() {
);

jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Answer type"));
jPanel7.setFont(jPanel7.getFont().deriveFont((float)10));
jPanel7.setFont(jPanel7.getFont().deriveFont(VennMakerUIConfig.getFontSize()));

buttonGroup1.add(numericalAnswerButton);
numericalAnswerButton.setText("Numerical");
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/interview/InterviewController.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import gui.Messages;
import gui.VennMaker;
import gui.configdialog.ConfigDialog;
import gui.utilities.VennMakerUIConfig;
import interview.elements.InterviewElement;
import interview.elements.StandardElement;
import interview.elements.meta.SwitchToNetworkElement;
Expand Down Expand Up @@ -34,6 +35,7 @@
import javax.swing.JProgressBar;
import javax.swing.KeyStroke;
import javax.swing.SwingConstants;
import javax.swing.UIManager;

import org.jvnet.flamingo.common.icon.ResizableIcon;
import org.jvnet.flamingo.svg.SvgBatikResizableIcon;
Expand Down Expand Up @@ -203,6 +205,9 @@ public InterviewController()
next = new JButton();
prev = new JButton();

next.setFont(UIManager.getFont("Label.font").deriveFont(VennMakerUIConfig.getFontSize()));
prev.setFont(UIManager.getFont("Label.font").deriveFont(VennMakerUIConfig.getFontSize()));

/**
* add ActionListener and shortcuts to buttons
*/
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/interview/elements/StandardElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import gui.Messages;
import gui.VennMaker;
import gui.configdialog.ConfigDialog;
import gui.utilities.VennMakerUIConfig;
import interview.InterviewElementInformation;
import interview.InterviewLayer;
import interview.UpdateListener;
Expand Down Expand Up @@ -141,7 +142,7 @@ public void focusGained(FocusEvent e)
String q = questions.keySet().iterator().next();
JLabel lblQuestion = new JLabel("<html>" + q + "</html>");
lblQuestion.setFont(lblQuestion.getFont().deriveFont(Font.BOLD)
.deriveFont(lblQuestion.getFont().getSize2D() + 4));
.deriveFont(VennMakerUIConfig.getFontSize() + 4));
g.gridx = x;
g.gridy = y;
g.gridheight = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ public Integer[] getFilterIndex()
}

/**
* Returns the network für the <code>StandardElement</code>
* @return the network für the <code>StandardElement</code>
* Returns the network for the <code>StandardElement</code>
* @return the network for the <code>StandardElement</code>
*/
public Netzwerk getNetwork()
{
return network;
}

/**
* Sets the network für the <code>StandardElement</code>
* @param network the network für the <code>StandardElement</code>
* Sets the network for the <code>StandardElement</code>
* @param network the network for the <code>StandardElement</code>
*/
public void setNetwork(Netzwerk network)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package interview.elements.message;

import gui.Messages;
import gui.utilities.VennMakerUIConfig;
import interview.InterviewElementInformation;
import interview.InterviewLayer;
import interview.categories.IECategory_MetaElement;
Expand Down Expand Up @@ -114,7 +115,7 @@ public JPanel getControllerDialog()

JLabel captionLabel = new JLabel(Messages.getString("DataProtectionElement.CaptionLabel"));
Font f = captionLabel.getFont().deriveFont(Font.BOLD);
f = f.deriveFont(f.getSize2D()+4);
f = f.deriveFont(VennMakerUIConfig.getFontSize()+4);
captionLabel.setFont(f);
JTextArea ta = new JTextArea();
ta.setText(infoArea.getText());
Expand Down Expand Up @@ -149,7 +150,7 @@ public JPanel getControllerDialog()
{
JLabel instituteLabel = new JLabel(instituteField.getText());
f = instituteLabel.getFont().deriveFont(Font.ITALIC);
f = f.deriveFont(f.getSize2D()+6);
f = f.deriveFont(VennMakerUIConfig.getFontSize()+6);
instituteLabel.setFont(f);

c = new GridBagConstraints();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import gui.Messages;
import gui.VennMaker;
import gui.utilities.VennMakerUIConfig;
import interview.InterviewController;
import interview.InterviewElementInformation;
import interview.InterviewLayer;
Expand Down Expand Up @@ -161,7 +162,7 @@ public JPanel getControllerDialog()
+ (VennMaker.getInstance().getProject().getAkteure().size() )
+ " / " + this.maximumAlteriSpinner.getValue() + ")");
Font f = captionLabel.getFont().deriveFont(Font.BOLD);
f = f.deriveFont(f.getSize2D() + 4);
f = f.deriveFont(VennMakerUIConfig.getFontSize() + 4);
captionLabel.setFont(f);
JTextArea ta = new JTextArea();
ta.setText(infoField.getText());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import gui.Messages;
import gui.VennMaker;
import gui.utilities.VennMakerUIConfig;
import interview.InterviewController;
import interview.InterviewElementInformation;
import interview.InterviewLayer;
Expand Down Expand Up @@ -159,7 +160,7 @@ public JPanel getControllerDialog()
+ (VennMaker.getInstance().getProject().getAkteure().size() )
+ " / " + this.minimumAlteriSpinner.getValue() + ")");
Font f = captionLabel.getFont().deriveFont(Font.BOLD);
f = f.deriveFont(f.getSize2D() + 4);
f = f.deriveFont(VennMakerUIConfig.getFontSize() + 4);
captionLabel.setFont(f);
JTextArea ta = new JTextArea();
ta.setText(infoField.getText());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import gui.configdialog.ConfigDialogTempCache;
import gui.configdialog.individual.EditIndividualAttributeTypeDialog;
import gui.configdialog.settings.SettingAddAttributeType;
import gui.utilities.VennMakerUIConfig;
import interview.InterviewController;
import interview.InterviewElementInformation;
import interview.InterviewLayer;
Expand Down Expand Up @@ -284,7 +285,7 @@ public void valueChanged(ListSelectionEvent arg0)
questionArea.setWrapStyleWord(true);
questionArea.setBackground(controllerDialog.getBackground());
Font f = questionArea.getFont().deriveFont(Font.BOLD);
questionArea.setFont(f.deriveFont((float) (f.getSize() + 4)));
questionArea.setFont(f.deriveFont(VennMakerUIConfig.getFontSize() + 4f));

JScrollPane questionAreaPane = new JScrollPane(questionArea);
questionAreaPane.setFocusable(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import gui.configdialog.ConfigDialogTempCache;
import gui.configdialog.individual.EditIndividualAttributeTypeDialog;
import gui.configdialog.settings.SettingAddAttributeType;
import gui.utilities.VennMakerUIConfig;
import interview.InterviewController;
import interview.InterviewElementInformation;
import interview.InterviewLayer;
Expand Down Expand Up @@ -165,7 +166,7 @@ public void focusGained(FocusEvent e)
questionArea.setLineWrap(true);
questionArea.setWrapStyleWord(true);
Font f = questionArea.getFont().deriveFont(Font.BOLD);
questionArea.setFont(f.deriveFont((float) (f.getSize() + 4)));
questionArea.setFont(f.deriveFont(VennMakerUIConfig.getFontSize() + 4f));

JScrollPane questionAreaPane = new JScrollPane(questionArea);
questionAreaPane.setFocusable(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import gui.Messages;
import gui.VennMaker;
import gui.utilities.VennMakerUIConfig;

import java.awt.BorderLayout;
import java.awt.Color;
Expand Down Expand Up @@ -216,17 +217,16 @@ private void buildPairList()
{
JPanel completePanel = new JPanel(new BorderLayout());

String direction = VennMaker.getInstance().getProject()
.getIsDirected(aType.getType()) ? " -- &gt " : " &lt -- &gt ";

completePanel.add(
new JLabel("<html><h2> &emsp &emsp " + relationOwner.getName()
+ direction + actors.get(0).getName() + "</h2></html>",
SwingConstants.CENTER), BorderLayout.NORTH);
String direction = VennMaker.getInstance().getProject().getIsDirected(aType.getType()) ? " -- > " : " < -- > ";

JLabel pairTitle = new JLabel(relationOwner.getName() + direction + actors.get(0).getName(), SwingConstants.CENTER);
pairTitle.setFont(pairTitle.getFont().deriveFont(VennMakerUIConfig.getFontSize()));

completePanel.add(pairTitle, BorderLayout.NORTH);

JPanel panel = new JPanel(new GridLayout(actors.size() + 1,
aType.getPredefinedValues().length + 1));

panel.add(new JPanel());
Object[] preVals = aType.getPredefinedValues();

Expand Down

0 comments on commit 661fb70

Please sign in to comment.