Commit d7ad365c authored by SAINT-MARCEL Frederic's avatar SAINT-MARCEL Frederic
Browse files

minor modification

parent 8e4113f3
/**
*
*$Id: FlowComposer.java,v 1.30 2002-05-30 13:17:05 frederic Exp $
*$Id: FlowComposer.java,v 1.31 2002-05-30 16:20:40 frederic Exp $
*
* Transmorpher
*
......@@ -50,6 +50,7 @@ import java.util.*;
import java.io.*;
import java.applet.*;
import javax.swing.*;
import javax.swing.border.Border;
import java.awt.event.*;
import java.net.URL;
import java.net.URLConnection;
......@@ -260,14 +261,15 @@ public class FlowComposer extends JPanel implements GraphModelListener,
buttons = createButtons();
// Add a ToolBar
//JPanel tool = new JPanel();
//tool.setLayout(new GridLayout(2,0));
tool.add(createToolBar("toolbar1"));
tool.add(createToolBar("toolbar2"));
panel.add(tool,BorderLayout.NORTH);
JPanel center = new JPanel();
center.setLayout(new BorderLayout());
panel.add(createToolBar("toolbar1"),BorderLayout.NORTH);
center.add(createToolBar("toolbar2"),BorderLayout.NORTH);
Border etched = BorderFactory.createRaisedBevelBorder();
center.setBorder(etched);
//Add a JTabbedPane for represnting the process notion.
tabProcess= new JTabbedPane();
tabProcess.getModel().addChangeListener(
new ChangeListener() {
......@@ -295,8 +297,8 @@ public class FlowComposer extends JPanel implements GraphModelListener,
addProcess(new String("main"),MAIN);
// Add the Graph as Center Component
center.add(tabProcess, BorderLayout.CENTER);
panel.add(center,BorderLayout.CENTER);
center.add(tabProcess, BorderLayout.CENTER);
panel.add(center,BorderLayout.CENTER);
this.add(createMenubar(),BorderLayout.NORTH);
this.add(panel,BorderLayout.CENTER);
this.add(status,BorderLayout.SOUTH);
......@@ -401,21 +403,7 @@ public class FlowComposer extends JPanel implements GraphModelListener,
currentProcess.getModel().addUndoableEditListener(undoHandler);
sp = new JScrollPane(currentProcess);
JViewport port = sp.getViewport();
colrule = new Rule(Rule.HORIZONTAL,isMetric,currentProcess);
sp.setColumnHeaderView(colrule);
rowrule = new Rule(Rule.VERTICAL,isMetric,currentProcess);
sp.setRowHeaderView(rowrule);
final JButton button = new JButton("...");
button.setFont(currentProcess.getFont().deriveFont(8));
sp.setCorner(JScrollPane.UPPER_LEFT_CORNER, button);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
boolean metric = !colrule.isMetric();
colrule.setIsMetric(metric);
rowrule.setIsMetric(metric);
}
});
sp = (JScrollPane)(tabProcess.add(process.getName(),sp));
tabProcess.setSelectedComponent(sp);
currentProcess = (ProcessGraph)(sp.getViewport().getView());
......@@ -560,7 +548,9 @@ public class FlowComposer extends JPanel implements GraphModelListener,
public Component createToolBar(String st) {
toolbar = new JToolBar();
toolbar.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
toolbar.setBorderPainted(true);
//toolbar.setFloatable(true);
// toolbar.setBorderPainted(true);
String[] tool = tokenize(getResourceString(st));
for (int i = 0; i < tool.length; i++) {
if (tool[i].equals("-")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment