super(new BorderLayout());  listenerList = new EventListenerList();  this.mode = mode; this.multipleSelection = multipleSelection; this.view = view;  ActionHandler actionHandler = new ActionHandler();  Box topBox = new Box(BoxLayout.Y_AXIS); topBox.add(createToolBar());  GridBagLayout layout = new GridBagLayout(); JPanel pathAndFilterPanel = new JPanel(layout);  GridBagConstraints cons = new GridBagConstraints(); cons.gridwidth = cons.gridheight = 1; cons.gridx = cons.gridy = 0; cons.fill = GridBagConstraints.BOTH; cons.anchor = GridBagConstraints.EAST; JLabel label = new JLabel(jEdit.getProperty("vfs.browser.path"), SwingConstants.RIGHT); label.setBorder(new EmptyBorder(0,0,0,12)); layout.setConstraints(label,cons); pathAndFilterPanel.add(label);  pathField = new HistoryTextField("vfs.browser.path",true,false);     Dimension prefSize = pathField.getPreferredSize(); prefSize.width = 0; pathField.setPreferredSize(prefSize);  pathField.addActionListener(actionHandler); cons.gridx = 1; cons.weightx = 1.0f;  layout.setConstraints(pathField,cons); pathAndFilterPanel.add(pathField);  filterCheckbox = new JCheckBox(jEdit.getProperty("vfs.browser.filter")); filterCheckbox.setMargin(new Insets(0,0,0,0)); filterCheckbox.setRequestFocusEnabled(false); filterCheckbox.setBorder(new EmptyBorder(0,0,0,12)); filterCheckbox.setSelected(jEdit.getBooleanProperty( "vfs.browser.filter-enabled")); filterCheckbox.setForeground(UIManager.getColor("Label.foreground")); filterCheckbox.addActionListener(actionHandler); cons.gridx = 0; cons.weightx = 0.0f; cons.gridy = 1; layout.setConstraints(filterCheckbox,cons); pathAndFilterPanel.add(filterCheckbox);  filterField = new HistoryTextField("vfs.browser.filter",true); filterField.addActionListener(actionHandler);  cons.gridx = 1; cons.weightx = 1.0f; layout.setConstraints(filterField,cons); pathAndFilterPanel.add(filterField);  topBox.add(pathAndFilterPanel); add(BorderLayout.NORTH,topBox);  add(BorderLayout.CENTER,browserView = new BrowserView(this));  propertiesChanged();  HistoryModel filterModel = HistoryModel.getModel("vfs.browser.filter"); String filter; if(filterModel.getSize() == 0) filter = jEdit.getProperty("vfs.browser.default-filter"); else filter = filterModel.getItem(0);  filterField.setText(filter); filterField.addCurrentToHistory();  updateFilterEnabled();  if(path == null) { String defaultPath = jEdit.getProperty("vfs.browser.defaultPath"); String userHome = System.getProperty("user.home"); if(defaultPath.equals("home")) path = userHome; else if(defaultPath.equals("buffer")) { if(view != null) { Buffer buffer = view.getBuffer(); path = buffer.getVFS().getParentOfPath( buffer.getPath()); } else path = userHome; } else if(defaultPath.equals("last")) { HistoryModel pathModel = HistoryModel.getModel("vfs.browser.path"); if(pathModel.getSize() == 0) path = userHome; else path = pathModel.getItem(0); } else {  path = userHome; } }  setDirectory(path);
this(view,path,BROWSER,false);
	public VFSBrowser(View view, String path, int mode, boolean multipleSelection)	{		super(new BorderLayout());		listenerList = new EventListenerList();		this.mode = mode;		this.multipleSelection = multipleSelection;		this.view = view;		ActionHandler actionHandler = new ActionHandler();		Box topBox = new Box(BoxLayout.Y_AXIS);		topBox.add(createToolBar());		GridBagLayout layout = new GridBagLayout();		JPanel pathAndFilterPanel = new JPanel(layout);		GridBagConstraints cons = new GridBagConstraints();		cons.gridwidth = cons.gridheight = 1;		cons.gridx = cons.gridy = 0;		cons.fill = GridBagConstraints.BOTH;		cons.anchor = GridBagConstraints.EAST;		JLabel label = new JLabel(jEdit.getProperty("vfs.browser.path"),			SwingConstants.RIGHT);		label.setBorder(new EmptyBorder(0,0,0,12));		layout.setConstraints(label,cons);		pathAndFilterPanel.add(label);		pathField = new HistoryTextField("vfs.browser.path",true,false);		// because its preferred size can be quite wide, we		// don't want it to make the browser way too big,		// so set the preferred width to 0.		Dimension prefSize = pathField.getPreferredSize();		prefSize.width = 0;		pathField.setPreferredSize(prefSize);		pathField.addActionListener(actionHandler);		cons.gridx = 1;		cons.weightx = 1.0f;		layout.setConstraints(pathField,cons);		pathAndFilterPanel.add(pathField);		filterCheckbox = new JCheckBox(jEdit.getProperty("vfs.browser.filter"));		filterCheckbox.setMargin(new Insets(0,0,0,0));		filterCheckbox.setRequestFocusEnabled(false);		filterCheckbox.setBorder(new EmptyBorder(0,0,0,12));		filterCheckbox.setSelected(jEdit.getBooleanProperty(			"vfs.browser.filter-enabled"));		filterCheckbox.setForeground(UIManager.getColor("Label.foreground"));		filterCheckbox.addActionListener(actionHandler);		cons.gridx = 0;		cons.weightx = 0.0f;		cons.gridy = 1;		layout.setConstraints(filterCheckbox,cons);		pathAndFilterPanel.add(filterCheckbox);		filterField = new HistoryTextField("vfs.browser.filter",true);		filterField.addActionListener(actionHandler);		cons.gridx = 1;		cons.weightx = 1.0f;		layout.setConstraints(filterField,cons);		pathAndFilterPanel.add(filterField);		topBox.add(pathAndFilterPanel);		add(BorderLayout.NORTH,topBox);		add(BorderLayout.CENTER,browserView = new BrowserView(this));		propertiesChanged();		HistoryModel filterModel = HistoryModel.getModel("vfs.browser.filter");		String filter;		if(filterModel.getSize() == 0)			filter = jEdit.getProperty("vfs.browser.default-filter");		else			filter = filterModel.getItem(0);		filterField.setText(filter);		filterField.addCurrentToHistory();		updateFilterEnabled();		if(path == null)		{			String defaultPath = jEdit.getProperty("vfs.browser.defaultPath");			String userHome = System.getProperty("user.home");			if(defaultPath.equals("home"))				path = userHome;			else if(defaultPath.equals("buffer"))			{				if(view != null)				{					Buffer buffer = view.getBuffer();					path = buffer.getVFS().getParentOfPath(						buffer.getPath());				}				else					path = userHome;			}			else if(defaultPath.equals("last"))			{				HistoryModel pathModel = HistoryModel.getModel("vfs.browser.path");				if(pathModel.getSize() == 0)					path = userHome;				else					path = pathModel.getItem(0);			}			else			{				// unknown value??!!!				path = userHome;			}		}		setDirectory(path);	}