Skip to content

Commit

Permalink
Code reformatting using gradlew format
Browse files Browse the repository at this point in the history
  • Loading branch information
com.github.youribonnaffe.gradle.format authored and koppor committed Jun 21, 2015
1 parent bcf47fd commit c5bcad7
Show file tree
Hide file tree
Showing 607 changed files with 53,008 additions and 50,976 deletions.
9 changes: 5 additions & 4 deletions src/main/java/net/sf/jabref/AbstractWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ public abstract class AbstractWorker implements Worker, CallBack {
private Worker worker;
private CallBack callBack;


public AbstractWorker() {
worker = (Worker)Spin.off(this);
callBack = (CallBack)Spin.over(this);
worker = (Worker) Spin.off(this);
callBack = (CallBack) Spin.over(this);

}

Expand All @@ -46,15 +47,15 @@ public void init() throws Throwable {
* whose methods will automatically be run off the EDT (Swing) thread.
*/
public Worker getWorker() {
return worker;
return worker;
}

/**
* This method returns a wrapped CallBack instance of this AbstractWorker
* whose methods will automatically be run on the EDT (Swing) thread.
*/
public CallBack getCallBack() {
return callBack;
return callBack;
}

/**
Expand Down
291 changes: 146 additions & 145 deletions src/main/java/net/sf/jabref/AdvancedTab.java

Large diffs are not rendered by default.

89 changes: 44 additions & 45 deletions src/main/java/net/sf/jabref/AppearancePrefsTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ class AppearancePrefsTab extends JPanel implements PrefsTab {
private boolean oldOverrideFontSize;
private JTextField fontSize, rowPadding;//, customIconThemeFile;


/**
* Customization of appearance parameters.
*
* @param prefs a <code>JabRefPreferences</code> value
*/
public AppearancePrefsTab(JabRefPreferences prefs) {
_prefs = prefs;
setLayout(new BorderLayout());
setLayout(new BorderLayout());

// Font sizes:
fontSize = new JTextField(5);
Expand All @@ -54,13 +55,13 @@ public AppearancePrefsTab(JabRefPreferences prefs) {
rowPadding = new JTextField(5);

colorCodes = new JCheckBox(
Globals.lang("Color codes for required and optional fields"));
Globals.lang("Color codes for required and optional fields"));
/*antialias = new JCheckBox(Globals.lang
("Use antialiasing font"));*/
overrideFonts = new JCheckBox(Globals.lang("Override default font settings"));

showGrid = new JCheckBox(Globals.lang("Show gridlines"));

//useCustomIconTheme = new JCheckBox(Globals.lang("Use custom icon theme"));
//customIconThemeFile = new JTextField();
FormLayout layout = new FormLayout
Expand Down Expand Up @@ -108,46 +109,44 @@ public AppearancePrefsTab(JabRefPreferences prefs) {
//p2.add(browseBut);
//builder.append(p2);

JPanel upper = new JPanel(),
sort = new JPanel(),
namesp = new JPanel(),
iconCol = new JPanel();
JPanel upper = new JPanel(), sort = new JPanel(), namesp = new JPanel(), iconCol = new JPanel();
GridBagLayout gbl = new GridBagLayout();
upper.setLayout(gbl);
sort.setLayout(gbl);
sort.setLayout(gbl);
namesp.setLayout(gbl);
iconCol.setLayout(gbl);

overrideFonts.addActionListener(new ActionListener() {

overrideFonts.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fontSize.setEnabled(overrideFonts.isSelected());
}
});

fontButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Font f = new FontSelectorDialog
(null, GUIGlobals.CURRENTFONT).getSelectedFont();
if (f != null) {
font = f;
public void actionPerformed(ActionEvent e) {
fontSize.setEnabled(overrideFonts.isSelected());
}
}
});
/*menuFontButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Font f=new FontSelectorDialog
(null, menuFont).getSelectedFont();
if(f==null)
return;
else
menuFont = f;
}
});*/

JPanel pan = builder.getPanel();
pan.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
add(pan, BorderLayout.CENTER);
});

fontButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {
Font f = new FontSelectorDialog
(null, GUIGlobals.CURRENTFONT).getSelectedFont();
if (f != null) {
font = f;
}
}
});
/*menuFontButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Font f=new FontSelectorDialog
(null, menuFont).getSelectedFont();
if(f==null)
return;
else
menuFont = f;
}
});*/

JPanel pan = builder.getPanel();
pan.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
add(pan, BorderLayout.CENTER);
}

public void setValues() {
Expand Down Expand Up @@ -186,10 +185,10 @@ public void storeSettings() {
if ((overrideFonts.isSelected() != oldOverrideFontSize) ||
(size != oldMenuFontSize)) {
_prefs.putInt("menuFontSize", size);
JOptionPane.showMessageDialog(null,
Globals.lang("You have changed the menu and label font size.")
.concat(" ")
.concat(Globals.lang("You must restart JabRef for this to come into effect.")),
JOptionPane.showMessageDialog(null,
Globals.lang("You have changed the menu and label font size.")
.concat(" ")
.concat(Globals.lang("You must restart JabRef for this to come into effect.")),
Globals.lang("Changed font settings"),
JOptionPane.WARNING_MESSAGE);
}
Expand All @@ -198,7 +197,7 @@ public void storeSettings() {
}
try {
int padding = Integer.parseInt(rowPadding.getText());
_prefs.putInt("tableRowPadding", padding);
_prefs.putInt("tableRowPadding", padding);
} catch (NumberFormatException ex) {
ex.printStackTrace();
}
Expand Down Expand Up @@ -229,12 +228,12 @@ public boolean readyToClose() {
if (validateIntegerField("Table row height padding", rowPadding.getText(), "Changed table appearance settings") == false) {
return false;
}

return true;

}

public String getTabName() {
return Globals.lang("Appearance");
}
public String getTabName() {
return Globals.lang("Appearance");
}
}
Loading

0 comments on commit c5bcad7

Please sign in to comment.