git-svn-id: https://svn.coded.pt/svn/SIPRP@1167 bb69d46d-e84e-40c8-a05a-06db0d633741

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Tiago Simão 16 years ago
parent 7b77fe0347
commit 229591ca0b

@ -8,7 +8,6 @@ import java.awt.event.ActionListener;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener; import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;

@ -6,6 +6,7 @@ import info.clearthought.layout.TableLayoutConstraints;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Insets; import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -30,9 +31,7 @@ public class TreeInserterDialog extends JDialog
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final Dimension ALL_DIMENSION = new Dimension(300,500); private static final Dimension DIALOG_DEFAULT_DIMENSIONS = new Dimension(800,500);
private static final Dimension NEW_DIMENSION = new Dimension(300,400);
private static final String ICON_NAME_ADD = "leaf/ui/icons/add.png"; private static final String ICON_NAME_ADD = "leaf/ui/icons/add.png";
@ -83,7 +82,15 @@ public class TreeInserterDialog extends JDialog
startupListeners(); startupListeners();
TreeTools.refreshTree(allTree, allRoot, true); TreeTools.refreshTree(allTree, allRoot, true);
setEnabled(); setEnabled();
this.setSize( 680, 400 ); Toolkit tk = Toolkit.getDefaultToolkit();
if( tk != null )
{
this.setSize( tk.getScreenSize().width, DIALOG_DEFAULT_DIMENSIONS.height );
}
else
{
this.setSize( DIALOG_DEFAULT_DIMENSIONS );
}
this.setLocationRelativeTo( null ); this.setLocationRelativeTo( null );
this.setModal( true ); this.setModal( true );
this.setVisible( true ); this.setVisible( true );
@ -99,8 +106,8 @@ public class TreeInserterDialog extends JDialog
allScroll.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); allScroll.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
newScroll.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS ); newScroll.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
newScroll.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); newScroll.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
allScroll.setPreferredSize( ALL_DIMENSION ); // allScroll.setPreferredSize( ALL_DIMENSION );
newScroll.setPreferredSize( NEW_DIMENSION ); // newScroll.setPreferredSize( NEW_DIMENSION );
buttonAdd.setToolTipText( "Adicionar" ); buttonAdd.setToolTipText( "Adicionar" );
buttonRemove.setToolTipText( "Remover" ); buttonRemove.setToolTipText( "Remover" );
buttonAdd.setMargin( new Insets(0,0,0,0) ); buttonAdd.setMargin( new Insets(0,0,0,0) );
@ -110,7 +117,7 @@ public class TreeInserterDialog extends JDialog
private void setupLayout() private void setupLayout()
{ {
TableLayout layout = new TableLayout( TableLayout layout = new TableLayout(
new double[]{ TableLayout.FILL, TableLayout.MINIMUM, TableLayout.PREFERRED, TableLayout.MINIMUM, TableLayout.MINIMUM }, new double[]{ TableLayout.FILL, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM, TableLayout.MINIMUM },
new double[]{ TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM, TableLayout.MINIMUM } new double[]{ TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM, TableLayout.MINIMUM }
); );
layout.setHGap( 5 ); layout.setHGap( 5 );

Loading…
Cancel
Save