Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FindDialog.addDialogCreationListener(new FindDialogCreationListener() {
- @Override void dialogCreated(FindDialog findDialog) {
- findDialog.setLocationRelativeTo(LGM.frame);
- }
- }
- class CustomFileChooserProvider implements JoshEdit.FileChooserProvider {
- @Override
- JFileChooser get() {
- CustomFileChooser fc = new CustomFileChooser("/org/lateralgm", "LAST_GAMEINFO_DIR"); //$NON-NLS-1$ //$NON-NLS-2$
- fc.setFileFilter(new CustomFileFilter(
- Messages.getString("JoshText.TYPE_TXT"), ".txt")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- public class CustomJEFileChooser implements JEFileChooser {
- CustomFileChooser fileChooser = new CustomFileChooser();
- @Override
- public String getLoadFilename() {
- fileChooser.setDialogTitle(Messages.getString("JoshText.SAVE_TITLE")); //$NON-NLS-1$
- if (fileChooser.showSaveDialog(this) != JFileChooser.APPROVE_OPTION) return null;
- return fileChooser.getSelectedFile().getPath();
- }
- @Override
- public String getSaveFilename()
- {
- fileChooser.setDialogTitle(Messages.getString("JoshText.LOAD_TITLE")); //$NON-NLS-1$
- if (fileChooser.showOpenDialog(null) != JFileChooser.APPROVE_OPTION) return null;
- return fileChooser.getSelectedFile().getPath();
- }
- }
- private class CustomJScrollPane extends JScrollPane
- {
- /** More ECJ */
- private static final long serialVersionUID = 1;
- public CustomJScrollPane(JComponent c)
- {
- super(c);
- // TODO Auto-generated constructor stub
- }
- @Override
- public void paintComponent(Graphics g)
- {
- // gtk does not outline the scroll component like the other look and feels
- // nimbus and the default and all the other ones put a border around the line
- // numbering as well as code area, gtk tries to put a border right between the
- // the two, this class gets around that by masking its back color to that of the
- // line number area
- //super.paint(g);
- g.setColor(lines.bgColor);
- g.fillRect(-1,-1,getWidth() + 11,getHeight() + 1);
- // paint children, the line number panel and code area
- this.paintChildren(g);
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement