📄 idd_finddialog.java
字号:
//------------------------------------------------------------------------------
// IDD_FINDDIALOG.java:
// Implementation for container control initialization class IDD_FINDDIALOG
//
// WARNING: Do not modify this file. This file is recreated each time its
// associated .rct/.res file is sent through the Java Resource Wizard!
//
// This class can be use to create controls within any container, however, the
// following describes how to use this class with an Applet. For addtional
// information on using Java Resource Wizard generated classes, refer to the
// Visual J++ 1.1 documention.
//
// 1) Import this class in the .java file for the Applet that will use it:
//
// import IDD_FINDDIALOG;
//
// 2) Create an instance of this class in your Applet's 'init' member, and call
// CreateControls() through this object:
//
// IDD_FINDDIALOG ctrls = new IDD_FINDDIALOG (this);
// ctrls.CreateControls();
//
// 3) To process events generated from user action on these controls, implement
// the 'handleEvent' member for your applet:
//
// public boolean handleEvent (Event evt)
// {
//
// }
//
//------------------------------------------------------------------------------
import java.awt.*;
import DialogLayout;
public class IDD_FINDDIALOG
{
Container m_Parent = null;
boolean m_fInitialized = false;
DialogLayout m_Layout;
// Control definitions
//--------------------------------------------------------------------------
Label IDC_STATIC1;
TextField IDCFINDTEXT;
Label IDC_STATIC2;
Checkbox IDCMATCH1;
Checkbox IDCMATCH2;
Checkbox IDCMATCH3;
Checkbox IDCMATCH4;
Label IDC_STATIC3;
CheckboxGroup group1;
Checkbox IDCUP;
Checkbox IDCDOWN;
Button IDFINDNEXT;
Button IDCANCEL;
Button IDC_HELP;
List IDCFONT;
Label IDC_STATIC4;
// Constructor
//--------------------------------------------------------------------------
public IDD_FINDDIALOG (Container parent)
{
m_Parent = parent;
}
// Initialization.
//--------------------------------------------------------------------------
public boolean CreateControls()
{
// Can only init controls once
//----------------------------------------------------------------------
if (m_fInitialized || m_Parent == null)
return false;
// Parent must be a derivation of the Container class
//----------------------------------------------------------------------
if (!(m_Parent instanceof Container))
return false;
// Since there is no way to know if a given font is supported from
// platform to platform, we only change the size of the font, and not
// type face name. And, we only change the font if the dialog resource
// specified a font.
//----------------------------------------------------------------------
Font OldFnt = m_Parent.getFont();
if (OldFnt != null)
{
Font NewFnt = new Font(OldFnt.getName(), OldFnt.getStyle(), 14);
m_Parent.setFont(NewFnt);
}
// All position and sizes are in Dialog Units, so, we use the
// DialogLayout manager.
//----------------------------------------------------------------------
m_Layout = new DialogLayout(m_Parent, 279, 200);
m_Parent.setLayout(m_Layout);
m_Parent.addNotify();
Dimension size = m_Layout.getDialogSize();
Insets insets = m_Parent.insets();
m_Parent.resize(insets.left + size.width + insets.right,
insets.top + size.height + insets.bottom);
// Control creation
//----------------------------------------------------------------------
IDC_STATIC1 = new Label ("Find Text:", Label.LEFT);
m_Parent.add(IDC_STATIC1);
m_Layout.setShape(IDC_STATIC1, 24, 23, 34, 11);
IDCFINDTEXT = new TextField ("");
m_Parent.add(IDCFINDTEXT);
m_Layout.setShape(IDCFINDTEXT, 61, 23, 136, 13);
IDC_STATIC2 = new Label ("Static Image", Label.LEFT);
m_Parent.add(IDC_STATIC2);
m_Layout.setShape(IDC_STATIC2, 211, 88, 54, 8);
IDCMATCH1 = new Checkbox ("Match &Whole Word Only");
m_Parent.add(IDCMATCH1);
m_Layout.setShape(IDCMATCH1, 26, 49, 95, 10);
IDCMATCH2 = new Checkbox ("&Match Case");
m_Parent.add(IDCMATCH2);
m_Layout.setShape(IDCMATCH2, 26, 63, 54, 10);
IDCMATCH3 = new Checkbox ("Regular &Expression");
m_Parent.add(IDCMATCH3);
m_Layout.setShape(IDCMATCH3, 26, 76, 81, 10);
IDCMATCH4 = new Checkbox ("Search an &Open Documents");
m_Parent.add(IDCMATCH4);
m_Layout.setShape(IDCMATCH4, 26, 91, 106, 10);
IDC_STATIC3 = new Label ("Visual Java Font Name", Label.LEFT);
m_Parent.add(IDC_STATIC3);
m_Layout.setShape(IDC_STATIC3, 26, 117, 90, 8);
group1 = new CheckboxGroup ();
IDCUP = new Checkbox ("&Up", group1, false);
m_Parent.add(IDCUP);
m_Layout.setShape(IDCUP, 159, 65, 25, 10);
IDCDOWN = new Checkbox ("&Down", group1, false);
m_Parent.add(IDCDOWN);
m_Layout.setShape(IDCDOWN, 159, 79, 34, 10);
IDFINDNEXT = new Button ("&Find Next");
m_Parent.add(IDFINDNEXT);
m_Layout.setShape(IDFINDNEXT, 27, 168, 47, 14);
IDCANCEL = new Button ("&Cancel");
m_Parent.add(IDCANCEL);
m_Layout.setShape(IDCANCEL, 115, 169, 45, 14);
IDC_HELP = new Button ("&Help");
m_Parent.add(IDC_HELP);
m_Layout.setShape(IDC_HELP, 202, 169, 40, 14);
IDCFONT = new List (1, false);
m_Parent.add(IDCFONT);
m_Layout.setShape(IDCFONT, 122, 104, 76, 40);
IDC_STATIC4 = new Label ("Dynamic Image", Label.LEFT);
m_Parent.add(IDC_STATIC4);
m_Layout.setShape(IDC_STATIC4, 212, 17, 60, 8);
m_fInitialized = true;
return true;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -