Skip to content

Commit

Permalink
Folgezettel Anfang/Mitte/Ende in Überschriftenliste
Browse files Browse the repository at this point in the history
  • Loading branch information
sjPlot committed Oct 12, 2015
1 parent 5cb9eb6 commit 4dd5f36
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,13 @@ protected Object doInBackground() {
// does user wants to make note sequence column sortable?
if (makeLuhmannSortable) {
if (dataObj.isTopLevelLuhmann(cnt)) {
luhmannindex = "2";
luhmannindex = "3";
} else if (dataObj.findParentlLuhmann(cnt, true) != -1) {
luhmannindex = "1";
if (dataObj.hasLuhmannNumbers(cnt)) {
luhmannindex = "2";
} else {
luhmannindex = "1";
}
}
}
// create a new object with these data
Expand Down
3 changes: 2 additions & 1 deletion src/de/danielluedecke/zettelkasten/util/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class Constants {
/**
* This variable stores the current programme and build version number
*/
public static final String BUILD_VERSION = "3.2.6.1 (Build 20151013)";
public static final String BUILD_VERSION = "3.2.6.1 (Build 20151014)";
/**
* This constants stores the website-address where the Zettelkasten can be
* downloaded:<br><br>
Expand Down Expand Up @@ -1122,6 +1122,7 @@ private static int getBibtexDescriptionIndex(String desc) {
public static final ImageIcon iconDesktopLuhmann = new ImageIcon(Constants.class.getResource("/de/danielluedecke/zettelkasten/resources/icons/luhmann-number_desk.png"));
public static final ImageIcon iconTopLuhmann = new ImageIcon(Constants.class.getResource("/de/danielluedecke/zettelkasten/resources/icons/top_luhmann.png"));
public static final ImageIcon iconNoTopLuhmann = new ImageIcon(Constants.class.getResource("/de/danielluedecke/zettelkasten/resources/icons/no_top_luhmann.png"));
public static final ImageIcon iconMiddleLuhmann = new ImageIcon(Constants.class.getResource("/de/danielluedecke/zettelkasten/resources/icons/middle_luhmann.png"));

/**
* This is the constant for the application's icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public class TitleTableCellRenderer extends JLabel implements TableCellRenderer

// column which contains icons instead of text
private final JLabel iconLabelParentLuhmann;
private final JLabel iconLabelAnyLuhmann;
private final JLabel iconLabelLastLuhmann;
private final JLabel iconLabelMiddleLuhmann;
private final JLabel noIconLabel;
private final Daten dataObj;
private Color selectionBackground = javax.swing.UIManager.getColor("Table[Enabled+Selected].textBackground");
Expand All @@ -30,7 +31,8 @@ public class TitleTableCellRenderer extends JLabel implements TableCellRenderer

public TitleTableCellRenderer(Daten d) {
this.iconLabelParentLuhmann = new JLabel(Constants.iconTopLuhmann);
this.iconLabelAnyLuhmann = new JLabel(Constants.iconNoTopLuhmann);
this.iconLabelLastLuhmann = new JLabel(Constants.iconNoTopLuhmann);
this.iconLabelMiddleLuhmann = new JLabel(Constants.iconMiddleLuhmann);
this.noIconLabel = new JLabel("");
if (null == tableRowAlternate) {
tableRowAlternate = Color.WHITE;
Expand Down Expand Up @@ -63,7 +65,11 @@ public Component getTableCellRendererComponent(
if (dataObj.isTopLevelLuhmann(nr)) {
returnLabel = this.iconLabelParentLuhmann;
} else if (dataObj.findParentlLuhmann(nr, true) != -1) {
returnLabel = this.iconLabelAnyLuhmann;
if (dataObj.hasLuhmannNumbers(nr)) {
returnLabel = this.iconLabelMiddleLuhmann;
} else {
returnLabel = this.iconLabelLastLuhmann;
}
} else {
returnLabel = this.noIconLabel;
}
Expand Down

0 comments on commit 4dd5f36

Please sign in to comment.