Menu

[r592]: / ch.sahits.codegen.java.gui / jet_templates / swtgui.javajet  Maximize  Restore  History

Download this file

47 lines (46 with data), 2.0 kB

<%@ jet imports="java.util.* ch.sahits.model.* ch.sahits.model.db.* ch.sahits.model.java.* ch.sahits.model.java.db.* ch.sahits.codegen.java.model.util.*" package="PAGAGE_NAME" class="CLASS_NAME" %>
<% IJavaForm genClass = (IJavaForm) argument; %>
<%=ConvenientCodegen.toPackageDefinition(genClass.getPackageName()) 
%><% if (!genClass.superclasses().get(0).equals("") && !ConvenientCodegen.isPrimitiveClass(genClass.superclasses().get(0))){
%>import <%=genClass.superclasses().get(0).getName() %>;
<% } // End if import superclass 
if (!genClass.interfaces().isEmpty()){ 
for (Iterator i = genClass.interfaces().iterator(); i.hasNext(); ){
Class c = (Class)i.next(); %>
import <%=c.getName() %>;
<% } // End for loop
} // End if for import interfaces
%>
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;

<% if (genClass.isPublic()){  %>
public <% } else if (genClass.isProtected()){ %>
protected <% } else if (genClass.isPrivate()){ %>
private <% } 
%><% if (genClass.isAbstract()) { 
%>abstract <% } 
%><% if (genClass.isFinal()) {
%>final <% } 
%>class <%=genClass.getClassName() %> <%
if (!genClass.superclasses().get(0).getName().equals("") && !ConvenientCodegen.isPrimitiveClass(genClass.superclasses().get(0))){
%> extends <%=ConvenientCodegen.getSimpleClassName(genClass.superclasses().get(0)) %>
<% }
if (!genClass.interfaces().isEmpty()){ 
int counter=0; 
int maxInt = genClass.interfaces().size();%> implements <% 
for (Iterator i = genClass.interfaces().iterator(); i.hasNext(); ){
Class c=(Class)i.next(); %><%=ConvenientCodegen.getSimpleClassName(c) %><%
counter++; 
if ( counter<maxInt){%>, <% 
} // End if for comma %><% 
} // End for loop over interfaces%><%
} // End if interfaces %> {
// convert all hidden fields to member variables of type string
// construct container
// create for the different fields
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.