tips.html

来自「eclipse插件jigloo」· HTML 代码 · 共 481 行 · 第 1/2 页

HTML
481
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>
  
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Jigloo GUI Builder Guide</title>
  

  
  
  <link rel="STYLESHEET" href="book.css" type="text/css">

  
  <meta name="author" content="Cloudgarden.com"></head>
<body bgcolor="white">
<font face="Helvetica, Arial, sans-serif"><big><b>Tips And FAQs</b></big><br>
<big><b><small><br>
</small></b></big></font>

<font face="Helvetica, Arial, sans-serif"><b>Installation</b><br>

</font>
<ul>
<li><font face="Helvetica, Arial, sans-serif"><big><a href="tips.html#help3"><small>Why does Eclipse not recognize that Jigloo (or the latest version of Jigloo) is installed?</small></a></big></font></li>
</ul>



<font face="Helvetica, Arial, sans-serif"><big><b><small>
Opening files with Jigloo</small></b><br>
</big></font>
<ul>

<li><font face="Helvetica, Arial, sans-serif"><big><a href="#help1"><small>I have a Java class written with a different IDE/GUI builder - how can I open it with Jigloo?</small></a></big></font></li><li><font face="Helvetica, Arial, sans-serif"><big><a href="#help2"><small>I
created a java class with Jigloo, but now when I open it it opens just
like a regular java class in the java editor - how can I open it with
Jigloo?</small></a></big></font></li>
</ul>


<font face="Helvetica, Arial, sans-serif"><b>Performance</b><br>

</font>
<ul>

<li><font face="Helvetica, Arial, sans-serif"><big><a href="#help4"><small>How can I make eclipse go faster with Jigloo open?</small></a></big></font></li>
</ul>


<font face="Helvetica, Arial, sans-serif"><big><small><b>Code Parsing</b><br>

</small></big></font>
<ul>
<li><font face="Helvetica, Arial, sans-serif"><a href="tips.html#help16_0">Which methods will Jigloo parse in my code?</a></font></li><li><font face="Helvetica, Arial, sans-serif"><a href="tips.html#help16_1">Which classes will Jigloo instantiate as it parses my code?
    </a></font></li><li><font face="Helvetica, Arial, sans-serif"><a href="tips.html#help16">Hiding code from Jigloo.</a></font></li>
</ul>
<font face="Helvetica, Arial, sans-serif"><big><b><small>Coding Tips<br>

</small></b></big></font>
<ul>

<li><font face="Helvetica, Arial, sans-serif"><a href="#help7">Using Jigloo's visual inheritance.</a></font></li><li><font face="Helvetica, Arial, sans-serif"><a href="#help8">Reformatting the source code.</a><br>
    </font></li>
</ul>


<font face="Helvetica, Arial, sans-serif"><big><b><small>Productivity Tips</small></b><small><br>

</small></big></font>
<ul>

<li><font face="Helvetica, Arial, sans-serif"><a href="#help9">Stopping &amp; starting code parsing.</a></font></li><li><font face="Helvetica, Arial, sans-serif"><a href="#help10">Multi-selecting elements (by CTRL and selection marquee).</a></font></li><li><font face="Helvetica, Arial, sans-serif"><a href="#help11">Select a component in the Outline by holding Alt down while clicking in the source editor.</a></font></li>
<li><font face="Helvetica, Arial, sans-serif"><a href="#help12">Moving elements</a></font></li><li><font face="Helvetica, Arial, sans-serif"><a href="#help13">Copying &amp; pasting elements</a></font></li><li><font face="Helvetica, Arial, sans-serif"><a href="#help14">Changing preferred sizes in GridBag and Form Layouts</a></font></li><li><font face="Helvetica, Arial, sans-serif"><a href="#help15">Changing an element's text property quickly.</a></font></li>
</ul>

<font face="Helvetica, Arial, sans-serif"><b>Custom components</b><br>

</font>
<ul>
<li><font face="Helvetica, Arial, sans-serif"><big><a href="tips.html#help5"><small>How
can I give my custom component an icon that will show up in Jigloo's
"Custom" palette, instead of the default java-bean icon?</small></a></big></font></li>
</ul>


<font face="Helvetica, Arial, sans-serif"><big><b><small>Miscellaneous<br>

</small></b></big></font>
<ul>
  <li><font face="Helvetica, Arial, sans-serif"><a href="#help17">Maximize the main editor by double-clicking on it's name tag.</a></font></li>

  <li><font face="Helvetica, Arial, sans-serif"><a href="#help18">How to move a component that is behind another
component.</a></font></li>
  <li><font face="Helvetica, Arial, sans-serif"><a href="#help19">Working with SWT classes not initially created by Jigloo</a></font></li>
</ul>

<font face="Helvetica, Arial, sans-serif"><big><b><small>Problems</small></b><small><br>

</small></big></font>
<ul>

<li><font face="Helvetica, Arial, sans-serif"><a href="#help20_0"><big><small>Why can't I change the location/size of my GUI elements?</small></big></a><br>
    </font>
</li><li><font face="Helvetica, Arial, sans-serif"><a href="#help20">Errors with properties or fields not being recognized</a></font></li>
<li><font face="Helvetica, Arial, sans-serif"><a href="#help21">Problems on Linux</a></font></li>
</ul>

<font face="Helvetica, Arial, sans-serif"><u><big><big><br>
</big></big></u><big><b><small><br>

</small></b><u><b>Installation<br>
<br>
</b></u></big><big><b><small>
</small><small><a name="help3"></a>Why does Eclipse not recognize that Jigloo (or the latest version of Jigloo) is installed?</small></b><br>
</big></font>

<font face="Helvetica, Arial, sans-serif"><br>

Eclipse 3 has problems with it's plugin cache and sometimes does not
recognize that a plugin has been installed or upgraded. You can force
Eclipse to re-load all the plugin definitions by either:<br>

</font>
<ol>
<li><font face="Helvetica, Arial, sans-serif">deleting or moving the eclipse/configuration folder or</font></li><li><font face="Helvetica, Arial, sans-serif">starting eclipse by opening a command-line console in the eclipse folder and executing "eclipse -clean -vmargs -Xmx300m"<br>

    </font></li>
</ol>



<font face="Helvetica, Arial, sans-serif"><big><b><small><br>

</small></b></big><u><big><big><b><small>Opening files with Jigloo</small></b></big></big></u><br>
<br>
<big><b><small><a name="help1"></a>I have a Java class written with a different IDE/GUI builder - how can I open it with Jigloo?</small><br>
</b></big></font>




<font face="Helvetica, Arial, sans-serif"><br>

Locate your class in Eclipse's Package Explorer view, then right-click
on it and choose "Open with-&gt;Form Editor". Jigloo should open the
class.<big><br>
<b><small><br>

<br>

<br>

<a name="help2"></a>I
created a java class with Jigloo, but now when I open it it opens just
like a regular java class in the java editor - how can I open it with
Jigloo?<br>

</small></b></big></font>
<font face="Helvetica, Arial, sans-serif"><br>

Sometimes Eclipse does not remember which editor it used previously to
open a file, so you need to make sure that your class is not opened in
any editor in eclipse, then right-click on the file and choose "Open
with-&gt;Form Editor".<big><br>
<b><small><br>

</small></b></big><big><u><b>Performance</b></u></big><br>
<big><b><small><br>

<a name="help4"></a>How can I make eclipse go faster with Jigloo open?<br>

</small></b></big></font>

<font face="Helvetica, Arial, sans-serif"><br>

By
default, Eclipse does not start with a large allocation of memory, and
using Jigloo inside Eclipse to open a large file can require 20-100MB
of memory, so it is a good idea to allow Eclipse to use about
200-400MB. One way to do this is to start Eclipse using a
script or batch file in the eclipse folder which executes the command:<br>

<br>

java -Xmx300m -cp startup.jar org.eclipse.core.launcher.Main<br>

</font><font face="Helvetica, Arial, sans-serif"><br>

or alternatively executing the eclipse executable with these arguments:<br>

<br>

eclipse -vmargs -Xmx300m<br>

<br>

</font><font face="Helvetica, Arial, sans-serif"><b><u><big><br>
Code Parsing</big></u><br>
<br>
</b></font><font face="Helvetica, Arial, sans-serif"><b><br>
<a name="help16_0"></a>W</b><b><font><font>hich methods will Jigloo parse in my code?</font></font></b></font><font face="Helvetica, Arial, sans-serif"><br>
</font>
<blockquote><font face="Helvetica, Arial, sans-serif">Jigloo starts by
parsing the constructors of your class. If it finds a call to other
class methods (eg, if "createComponents" is a method of your class, and
it is called from your constructor), then those methods will be parsed
by jigloo as it encounters the method calls. Similarly, if those
methods call other methods then those methods will be parsed and so on.
If, in the course of parsing the constructors and all the methods
called by the constructors etc, one of the "GUI initialization" methods
is parsed, then jigloo will stop parsing your code. <i><br>
  <br>
The "GUI initialization" methods are by default {initGUI,
initComponents, initialize, open, createPartControl, createContents,
createControl and createDialogArea} but this list can be changed in the
  <a href="preferences_page.html">Jigloo Preferences Page</a>.</i> <br>
  <br>
If, however, none of the "GUI initialization" methods have been parsed
then Jigloo will search the code for one of these methods (in the order
in which they appear in the list) and will parse the first one it
finds. Eg, if a class has methods "open" and "initialize", then
"initialize" will be parsed because it appears first in the </font><font face="Helvetica, Arial, sans-serif">"GUI initialization" list. If none of the </font><font face="Helvetica, Arial, sans-serif">"GUI initialization" methods appear in a class, then every method in the class will be parsed. <br>
  <br>
Therefore if you always use a method "initializeGUI", say, to create
your code then you would add "initializeGUI" to the start of the </font><font face="Helvetica, Arial, sans-serif">"GUI initialization" list.<br>
  </font></blockquote>




<font face="Helvetica, Arial, sans-serif"><br>
<b><a name="help16_1"></a>Which classes will Jigloo instantiate as it parses my code?</b>
<br></font>
<blockquote><font face="Helvetica, Arial, sans-serif">As jigloo tries
to render your GUI in it's Form Editor, it needs to instantiate the
visual classes used and also any classes which are used as properties
of these visual classes. Also, if a method is called on a visual class
then Jigloo will try and instantiate the classes passed as parameters
for this method. However, Jigloo will not instantiate any other
classes. If you find that Jigloo is instantiating a class that you do
not want it to instantiate, add this class to the "Forbidden
superclasses" list in the "Class creation" tab of </font><font face="Helvetica, Arial, sans-serif">the <a href="preferences_page.html">Jigloo Preferences Page</a>. </font></blockquote>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?