changeset 57:99958b2e2a5a

TabColumns: Redesigned button toolbar Now 'add column' button is located within a newly added bottom bar, instead of being at the top next to the title field. Added dummy 'back' and 'as card' buttons.
author Fox
date Fri, 23 Dec 2022 12:47:08 +0100
parents edfeca7d5b45
children 9cef3d27f2e8
files src/junotu/TabColumns.java
diffstat 1 files changed, 16 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/junotu/TabColumns.java	Sat Dec 17 14:14:00 2022 +0100
+++ b/src/junotu/TabColumns.java	Fri Dec 23 12:47:08 2022 +0100
@@ -400,31 +400,38 @@
     Box columns;
     JScrollPane scroll;
 
+    JButton back;
     JButton addColumn;
+    JButton editAsCard;
 
     public TabColumns()
     {
 	this.setLayout( new BorderLayout() );
 
 	title = new JTextField("");
-	addColumn = new JButton("+");
-	JPanel top = new JPanel();
+	back = new JButton("Back");
+	addColumn = new JButton("Add column");
+	editAsCard = new JButton("As card");
+	
+	Box bottom = Box.createHorizontalBox();
 	columns = Box.createHorizontalBox();
 	scroll = new JScrollPane( columns );
 	
-
-	top.setLayout( new BorderLayout() );
 	title.setFont( new Font( "Monospaced", Font.PLAIN, 32 ) );
-	addColumn.setFont( new Font( "Monospaced", Font.BOLD, 32 ) );
 
-	top.add( title, BorderLayout.CENTER );
-	top.add( addColumn, BorderLayout.EAST );
-	this.add( top, BorderLayout.NORTH );
+	bottom.add( back );
+	bottom.add( Box.createHorizontalGlue() );
+	bottom.add( addColumn );
+	bottom.add( editAsCard );
+	this.add( title, BorderLayout.NORTH );
 	this.add( scroll, BorderLayout.CENTER );
+	this.add( bottom, BorderLayout.SOUTH );
 
 	addColumn.addActionListener(this);
 
-	addColumn.setToolTipText("Add column.");
+	back.setToolTipText("Go back to where the card was accessed from.");
+	addColumn.setToolTipText("Add new column to the board.");
+	editAsCard.setToolTipText("Edit the board as a regular card.");
 
 	/* TODO: DEBUG */
 	columnsNew();