|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.jbuilder.jot.JotCodeGen
This interface encapsulates the user's code-formatting preferences such as tabsize, positioning of braces, adapter style, etc.
Field Summary | |
static int |
ANONYMOUS_INNER_ADAPTER_TYPE
Generate event adapters as an anonymous inner class |
static java.lang.String |
BEANS_INSTANTIATE
|
static java.lang.String |
BRACE_STYLE
|
static java.lang.String |
CODE_STYLE
|
static java.lang.String |
EVENT_MATCH
|
static java.lang.String |
EVENT_STYLE
|
static java.lang.String |
INSTANCE_VISIBILITY
|
static int |
NAMED_CLASS_ADAPTER_TYPE
Generate event adapters as a separate named class |
static java.lang.String |
USE_TABS
|
Constructor Summary | |
JotCodeGen()
|
Method Summary | |
static int |
addBasicOffset(int level)
|
static int |
addBraceOffset(int level)
|
static int |
addContinuedBraceOffset(int level)
|
static int |
addContinuedOffset(int level)
|
static int |
addLabelOffset(int level)
|
static java.lang.String |
getBraces(int indentLevel)
|
static java.lang.String |
getContinuedBraces(int indentLevel)
|
static int |
getEventAdapterType()
Returns the logical type of event adapter to use for events. |
static java.lang.String |
getIndent(int indentLevel)
Returns a string containing the proper whitespace to indent to the given level. |
static java.lang.String |
getIndentedBraces(int level)
|
static java.lang.String |
getIndentWhitespace(int level)
|
static int |
getInstanceVisibility()
Returns the Modifier constant that specifies what visibility to use for generated instance variables. |
static java.lang.String |
getLabelIndent(int indentLevel)
|
static void |
initProperties(JBProject project)
Interrogates the user's property settings concerning code generation style and sets the global(!) properties used by the rest of JOT and CMT |
static boolean |
isMatchEventStyle()
Returns true if we try to match the user's event adapter style |
static boolean |
isUseBeansInstantiate()
Returns true if the user prefers to use use Beans.instantiate
as the default technique for instantiating a component. |
static void |
setEventAdapterType(int type)
Specifies the logical type of event adapter to use for events. |
static void |
setInstanceVisibility(int visibility)
Set the visibility to use for generated instance variables. |
static void |
setMatchEventStyle(boolean yesNo)
Specifies whether JOT should try to match the user's event adapter style. |
static void |
setUseBeansInstantiate(boolean yesNo)
Specifies whether to use Beans.instantiate as the default technique
for instantiating a component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NAMED_CLASS_ADAPTER_TYPE
setEventAdapterType
public static final int ANONYMOUS_INNER_ADAPTER_TYPE
setEventAdapterType
public static final java.lang.String BRACE_STYLE
public static final java.lang.String EVENT_STYLE
public static final java.lang.String EVENT_MATCH
public static final java.lang.String USE_TABS
public static final java.lang.String BEANS_INSTANTIATE
public static final java.lang.String INSTANCE_VISIBILITY
public static final java.lang.String CODE_STYLE
Constructor Detail |
public JotCodeGen()
Method Detail |
public static void initProperties(JBProject project)
public static int getInstanceVisibility()
setInstanceVisibility(int)
public static void setInstanceVisibility(int visibility)
visibility
- The constant that specifies what visibility to use for
generated instance variables. Valid values are:
getInstanceVisibility()
public static boolean isUseBeansInstantiate()
true
if the user prefers to use use Beans.instantiate
as the default technique for instantiating a component. Otherwise, a new
expression is used.public static void setUseBeansInstantiate(boolean yesNo)
Beans.instantiate
as the default technique
for instantiating a component.public static int getEventAdapterType()
NAMED_CLASS_ADAPTER_TYPE
, then a member class is used
for the adapter. If the return value is ANONYMOUS_INNER_ADAPTER_TYPE
,
then event adapters are generated as anonymous classes.public static void setEventAdapterType(int type)
NAMED_CLASS_ADAPTER_TYPE
, then a member class is used for
the adapter. If the value is ANONYMOUS_INNER_ADAPTER_TYPE
, then
event adapters are generated as anonymous classes.public static boolean isMatchEventStyle()
true
if we try to match the user's event adapter stylepublic static void setMatchEventStyle(boolean yesNo)
public static java.lang.String getIndent(int indentLevel)
public static java.lang.String getLabelIndent(int indentLevel)
public static java.lang.String getBraces(int indentLevel)
public static java.lang.String getContinuedBraces(int indentLevel)
public static int addBasicOffset(int level)
public static int addBraceOffset(int level)
public static int addLabelOffset(int level)
public static int addContinuedOffset(int level)
public static int addContinuedBraceOffset(int level)
public static java.lang.String getIndentedBraces(int level)
public static java.lang.String getIndentWhitespace(int level)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |