jEdit Community - Resources for users of the jEdit Text Editor
resizing and relocating Dockable Window
Submitted by md9119 on Friday, 18 July, 2008 - 07:51
Hello,

I am writing my first plugin. I need to resize and relocate my plugin window. How do I do this? Neither of these two below do what I want:
view.setLocation(x,y); // relocates main editor
view.getDockableWindowManager().getDockableWindow(SideViewPlugin.NAME).setLocation(x, y); // this moves the JPanel to x,y _within_ the Dockable Window.

What I want to do is to move and resize the whole plugin window. How do I accomplish that?

Thank you,
Maciej
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Is it possible to get the win
by md9119 on Thu, 24/07/2008 - 10:00
Is it possible to get the window to resize at plugin startup? If I put it to any of the codes executed at startup (_start() function, dockables.xml bean shell code etc) I get a null pointer exception for view.getDockableWindowManager().getDockableWindow.(XYZPlugin.NAME).

I even tried capturing PluginUpdate message with another plugin, but that gives me the same exception.

Is there a way to get the handle of the window frame just after startup? In other words - is there a piece of code which gets executed after plugin initialization (where the handle is already available)?
 
In a startup script the prede
by Robert Schwenn on Thu, 24/07/2008 - 19:49
In a startup script the predefined variables like "view" are not defined yet - see Startup Scripts .

Maybe there are other things to consider, but plugins should already be loaded...

Robert
 
Hi, thank you for your respon
by md9119 on Fri, 25/07/2008 - 08:08
Hi, thank you for your response.

It need not be at program startup, but at the plugin startup. So after I succesfully launched jEdit, I would click on the plugin menu, select my plugin and have it automatically maximized. Is this possible? Thanks.
 
jEdit devel mailing list
by Robert Schwenn on Mon, 28/07/2008 - 19:29
Sorry, I can't help You.

You should ask the question at the jEdit-devel mailing list .

Robert
Ok I finally did that. JCo
by md9119 on Fri, 18/07/2008 - 08:52
Ok I finally did that.

JComponent c = view.getDockableWindowManager().getDockable(SideViewPlugin.NAME);
c.getTopLevelAncestor().setLocation(x,y);
//for maximizing
((JFrame)c.getTopLevelAncestor()).setExtendedState(JFrame.MAXIMIZED_BOTH);
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300