リファレンス: JDeveloperコード・テンプレート

 

ショートカット 説明
if if statement
if (|)
{

}          
ife if else statement
if (|)
{

} else
{

}          
for for loop
for (| ; ; )
{

}          
fori integer based loop
for (int i = 0; i  |; i++)
{

}          
forn integer based loop
int n = |;
for (int i = 0; i  n; i++)
{

}          
sw switch statement
switch (|)
{
 case XXX:
  {

  }
  break;

 default:
  {

  }
  break;
}          
try try statement
try
{
 |
} catch (Exception ex)
{
 ex.printStackTrace();
} finally
{
}          
wh while statement
while (|)
{

}          
pri private int
private int _|;          
prb private boolean
private boolean _|;          
prs private String
private String _|;          
pral private ArrayList
private ArrayList _| = new ArrayList();          
prhm private HashMap
private HashMap _| = new HashMap();          
pusf public static final
public static final |;          
pusfi public static final int
public static final int |;          
pusfb public static final boolean
public static final boolean |;          
pusfs public static final String
public static final String |;          
main main method
public static void main(String[] args)
{
 |
}          
sop System.out.println
System.out.println(|);          
sep System.err.println
System.err.println(|);          
aal Add a ActionListener
addActionListener(new ActionListener()
 {
  public void actionPerformed(ActionEvent e)
  {
   |
  }
 });          
acml Add a ComponentListener
addComponentListener(new ComponentListener()
 {|
  public void componentHidden(ComponentEvent e) {}
  public void componentMoved(ComponentEvent e) {}
  public void componentResized(ComponentEvent e) {}
  public void componentShown(ComponentEvent e) {}
 });          
acnl Add a ContainerListener
addContainerListener(new ContainerListener()
 {|
  public void componentAdded(ContainerEvent e) {}
  public void componentRemoved(ContainerEvent e) {}
 });          
afl Add a FocusListener
addFocusListener(new FocusListener()
 {|
  public void focusGained(FocusEvent e) {}
  public void focusLost(FocusEvent e) {}
 });          
ahbl Add a HierarchyBoundsListener
addHierarchyBoundsListener(new HierarchyBoundsListener()
 {|
  public void ancestorMoved(HierarchyEvent e) {}
  public void ancestorResized(HierarchyEvent e) {}
 });          
ahl Add a HierarchyListener
addHierarchyListener(new HierarchyListener()
 {
  public void hierarchyChanged(HierarchyEvent e)
  {
   |
  }
 });          
aiml Add a InputMethodListener
addInputMethodListener(new InputMethodListener()
 {|
  public void caretPositionChanged(InputMethodEvent e) {}
  public void inputMethodTextChanged(InputMethodEvent e) {}
 });          
ail Add a ItemListener
addItemListener(new ItemListener()
 {
  public void itemStateChanged(ItemEvent e)
  {
   |
  }
 });          
akl Add a KeyListener
addKeyListener(new KeyListener()
 {|
  public void keyPressed(KeyEvent e) {}
  public void keyReleased(KeyEvent e) {}
  public void keyTyped(KeyEvent e) {}
 });          
aml Add a MouseListener
addMouseListener(new MouseListener()
 {|
  public void mouseClicked(MouseEvent e) {}
  public void mouseEntered(MouseEvent e) {}
  public void mouseExited(MouseEvent e) {}
  public void mousePressed(MouseEvent e) {}
  public void mouseReleased(MouseEvent e) {}
 });          
amml Add a MouseMotionListener
addMouseMotionListener(new MouseMotionListener()
 {|
  public void mouseDragged(MouseEvent e) {}
  public void mouseMoved(MouseEvent e) {}
 });          
atl Add a TextListener
addTextListener(new TextListener()
 {
  public void textValueChanged(TextEvent e)
  {
   |
  }
 });          
awl Add a WindowListener
addWindowListener(new WindowListener()
 {|
  public void windowActivated(WindowEvent e) {}
  public void windowClosed(WindowEvent e) {}
  public void windowClosing(WindowEvent e) {}
  public void windowDeactivated(WindowEvent e) {}
  public void windowDeiconified(WindowEvent e) {}
  public void windowIconified(WindowEvent e) {}
  public void windowOpened(WindowEvent e) {}
 });          
aanl Add a AncestorListener
addAncestorListener(new AncestorListener()
 {|
  public void ancestorAdded(AncestorEvent e) {}
  public void ancestorMoved(AncestorEvent e) {}
  public void ancestorRemoved(AncestorEvent e) {}
 });          
acrl Add a CaretListener
addCaretListener(new CaretListener()
 {
  public void caretUpdate(CaretEvent e)
  {
   |
  }
 });          
acel Add a CellEditorListener
addCellEditorListener(new CellEditorListener()
 {|
  public void editingCanceled(ChangeEvent e) {}
  public void editingStopped(ChangeEvent e) {}
 });          
achl Add a ChangeListener
addChangeListener(new ChangeListener()
 {
  public void stateChanged(ChangeEvent e)
  {
   |
  }
 });          
adl Add a DocumentListener
addDocumentListener(new DocumentListener()
 {|
  public void changedUpdate(DocumentEvent e) {}
  public void insertUpdate(DocumentEvent e) {}
  public void removeUpdate(DocumentEvent e) {}
 });          
ahll Add a HyperlinkListener
addHyperlinkListener(new HyperlinkListener()
 {
  public void hyperlinkUpdate(HyperlinkEvent e)
  {
   |
  }
 });          
aifl Add a InternalFrameListener
addInternalFrameListener(new InternalFrameListener()
 {|
  public void internalFrameActivated(InternalFrameEvent e) {}
  public void internalFrameClosed(InternalFrameEvent e) {}
  public void internalFrameClosing(InternalFrameEvent e) {}
  public void internalFrameDeactivated(InternalFrameEvent e) {}
  public void internalFrameDeiconified(InternalFrameEvent e) {}
  public void internalFrameIconified(InternalFrameEvent e) {}
  public void internalFrameOpened(InternalFrameEvent e) {}
 });          
aldl Add a ListDataListener
addListDataListener(new ListDataListener()
 {|
  public void contentsChanged(ListDataEvent e) {}
  public void intervalAdded(ListDataEvent e) {}
  public void intervalRemoved(ListDataEvent e) {}
 });          
alsl Add a ListSelectionListener
addListSelectionListener(new ListSelectionListener()
 {
  public void valueChanged(ListSelectionEvent e)
  {
   |
  }
 });          
amdml Add a MenuDragMouseListener
addMenuDragMouseListener(new MenuDragMouseListener()
 {|
  public void menuDragMouseDragged(MenuDragMouseEvent e) {}
  public void menuDragMouseEntered(MenuDragMouseEvent e) {}
  public void menuDragMouseExited(MenuDragMouseEvent e) {}
  public void menuDragMouseReleased(MenuDragMouseEvent e) {}
 });          
amkl Add a MenuKeyListener
addMenuKeyListener(new MenuKeyListener()
 {|
  public void menuKeyPressed(MenuKeyEvent e) {}
  public void menuKeyReleased(MenuKeyEvent e) {}
  public void menuKeyTyped(MenuKeyEvent e) {}
 });          
amel Add a MenuListener
addMenuListener(new MenuListener()
 {|
  public void menuCanceled(MenuEvent e) {}
  public void menuDeselected(MenuEvent e) {}
  public void menuSelected(MenuEvent e) {}
 });          
amil Add a MouseInputListener
addMouseInputListener(new MouseInputListener()
 {|
  public void mouseDragged(MouseEvent e) {}
  public void mouseMoved(MouseEvent e) {}
  public void mouseClicked(MouseEvent e) {}
  public void mouseEntered(MouseEvent e) {}
  public void mouseExited(MouseEvent e) {}
  public void mousePressed(MouseEvent e) {}
  public void mouseReleased(MouseEvent e) {}
 });          
apml Add a PopupMenuListener
addPopupMenuListener(new PopupMenuListener()
 {|
  public void popupMenuCanceled(PopupMenuEvent e) {}
  public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {}
  public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
 });          
atcml Add a TableColumnModelListener
addTableColumnModelListener(new TableColumnModelListener()
 {|
  public void columnAdded(TableColumnModelEvent e) {}
  public void columnMarginChanged(ChangeEvent e) {}
  public void columnMoved(TableColumnModelEvent e) {}
  public void columnRemoved(TableColumnModelEvent e) {}
  public void columnSelectionChanged(ListSelectionEvent e) {}
 });          
ataml Add a TableModelListener
addTableModelListener(new TableModelListener()
 {
  public void tableChanged(TableModelEvent e)
  {
   |
  }
 });          
atel Add a TreeExpansionListener
addTreeExpansionListener(new TreeExpansionListener()
 {|
  public void treeCollapsed(TreeExpansionEvent e) {}
  public void treeExpanded(TreeExpansionEvent e) {}
 });          
atrml Add a TreeModelListener
addTreeModelListener(new TreeModelListener()
 {|
  public void treeNodesChanged(TreeModelEvent e) {}
  public void treeNodesInserted(TreeModelEvent e) {}
  public void treeNodesRemoved(TreeModelEvent e) {}
  public void treeStructureChanged(TreeModelEvent e) {}
 });          
atsl Add a TreeSelectionListener
addTreeSelectionListener(new TreeSelectionListener()
 {
  public void valueChanged(TreeSelectionEvent e)
  {
   |
  }
 });          
atwel Add a TreeWillExpandListener
addTreeWillExpandListener(new TreeWillExpandListener()
 {|
  public void treeWillCollapse(TreeExpansionEvent e) {}
  public void treeWillExpand(TreeExpansionEvent e) {}
 });          
auel Add a UndoableEditListener
addUndoableEditListener(new UndoableEditListener()
 {
  public void undoableEditHappened(UndoableEditEvent e)
  {
   |
  }
 });          
adgl Add a DragGestureListener
addDragGestureListener(new DragGestureListener()
 {
  public void dragGestureRecognized(DragGestureEvent e)
  {
   |
  }
 });          
adsl Add a DragSourceListener
addDragSourceListener(new DragSourceListener()
 {|
  public void dragDropEnd(DragSourceDropEvent e) {}
  public void dragEnter(DragSourceDragEvent e) {}
  public void dragExit(DragSourceEvent e) {}
  public void dragOver(DragSourceDragEvent e) {}
  public void dropActionChanged(DragSourceDragEvent e) {}
 });          
adtl Add a DropTargetListener
addDropTargetListener(new DropTargetListener()
 {|
  public void dragEnter(DropTargetDragEvent e) {}
  public void dragExit(DropTargetEvent e) {}
  public void dragOver(DropTargetDragEvent e) {}
  public void drop(DropTargetDropEvent e) {}
  public void dropActionChanged(DropTargetDragEvent e) {}
 });          
apcl Add a PropertyChangeListener
addPropertyChangeListener(new PropertyChangeListener()
 {
  public void propertyChange(PropertyChangeEvent e)
  {
   |
  }
 });          
avcl Add a VetoableChangeListener
addVetoableChangeListener(new VetoableChangeListener()
 {
  public void vetoableChange(PropertyChangeEvent e)
  {
   |
  }
 });          
outp out.println()
out.println(|);          
conn JDBC Connection
public static Connection getConnection() throws SQLException
{
 String username = "|scott";
 String password = "tiger";
 String thinConn = "jdbc:oracle:thin:@localhost:1521:ORCL";
 Driver d = new OracleDriver();
 Connection conn = DriverManager.getConnection(thinConn,username,password);
 conn.setAutoCommit(false);
 return conn;
}          
bc4jclient Instantiate a BC4J application module
String        amDef = "test.TestModule";
String        config = "TestModuleLocal";
ApplicationModule am =
Configuration.createRootApplicationModule(amDef,config);
ViewObject vo = am.findViewObject("TestView");
|// Work with your appmodule and view object here
Configuration.releaseRootApplicationModule(am,true);          
daev Add event handler to DataAction or DataForwardAction
public void on|(DataActionContext ctx)
{
  // Enter code before executing the default action
  if (ctx.getEventActionBinding() != null) ctx.getEventActionBinding().doIt();
  // Enter code after executing the default action
}          

 


コード・エディタのコード・テンプレートのカスタマイズ
コード・テンプレートの使用

 

Copyright © 1997, 2004, Oracle. All rights reserved.