51
Dev开发社区
首页
文章
问答
工具
搜索
登录
注册
#e6
e610. Setting Focus Traversal Keys in a Component
Whenthefocusisonacomponent,anyfocustraversalkeyssetforthatcomponentoverridethedefaultfocustraversalkeys.Foranexampleofhowtochangethefocustraversalkeysfortheenti...
代码星球
·
2021-02-12
e610.
Setting
Focus
Traversal
Keys
e611. Setting Focus Traversal Keys for the Entire Application
Thisexamplechangesthefocustraversalkeysfortheentireapplication.Foranexampleofhowtochangethefocustraversalkeysforaparticularcomponent,seee610SettingFocusTraversa...
代码星球
·
2021-02-12
e611.
Setting
Focus
Traversal
Keys
e612. Moving the Focus to the Next or Previous Focusable Component
ThemethodstomovethefocustothenextortothepreviousfocusablecomponentareComponent.transferFocus()andComponent.transferFocusBackward().Thisexamplemodifiesacomponent...
代码星球
·
2021-02-12
the
e612.
Moving
Focus
to
e609. Listening to All Focus Changes Between Components in an Application
Tolistentofocuschangeeventsbetweencomponents,installalistenerwiththekeyboardfocusmanager.Ifyouneedtheabilitytoveto(reject)afocuschange,installavetoablelistenerw...
代码星球
·
2021-02-12
e609.
Listening
to
All
Focus
e615. Finding the Next Focusable Component
publicComponentfindNextFocus(){//FindfocusownerComponentc=KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();Containerroot=c==null?null:c.get...
代码星球
·
2021-02-12
e615.
Finding
the
Next
Focusable
e606. Determining Which Component or Window Has the Focus
//nullisreturnedifnoneofthecomponentsinthisapplicationhasthefocusComponentcompFocusOwner=KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();/...
代码星球
·
2021-02-12
e606.
Determining
Which
Component
or
e621. Activating a Keystroke When Any Child Component Has Focus
Normally,akeystrokeregisteredonacomponentisactivatedwhenthecomponenthasthefocus.ThistypeofactivationconditioniscalledWHEN_FOCUSED.Itispossibletospecifythatakeys...
代码星球
·
2021-02-12
e621.
Activating
Keystroke
When
Any
e636. Listening to All Key Events Before Delivery to Focused Component
Registeringakeyeventdispatcherwiththekeyboardfocusmanagerallowsyoutoseeallkeyeventsbeforetheyaresenttothefocusedcomponent.Itispossibletomodifytheeventorevenprev...
代码星球
·
2021-02-12
to
e636.
Listening
All
Key
e683. 设置打印的方向
PrinterJobpjob=PrinterJob.getPrinterJob();PageFormatpf=pjob.defaultPage();if(portrait){pf.setOrientation(PageFormat.PORTRAIT);}else{pf.setOrientation(PageFormat...
代码星球
·
2021-02-11
e683.
设置
打印
方向
e686. 显示打印窗口
Theprintdialogallowstheusertochangethedefaultprintersettingssuchasthedefaultprinter,numberofcopies,rangeofpages,etc.PrinterJobpjob=PrinterJob.getPrinterJob();Pa...
代码星球
·
2021-02-11
e686.
显示
打印
窗口
e684. 以多种格式打印
ABookobjectisusedwhenprintingpageswithdifferentpageformats.Thisexampleprintsthefirstpageinlandscapeandfivemorepagesinportrait.publicclassPrintBook{publicstaticv...
代码星球
·
2021-02-11
e684.
多种
格式
打印
e682. 获得打印页的尺寸
Notethat(0,0)oftheGraphicsobjectisatthetop-leftoftheactualpage,whichisoutsidetheprintablearea.publicintprint(Graphicsg,PageFormatpf,intpageIndex){//Theareaofthe...
代码星球
·
2021-02-11
e682.
获得
印页
尺寸
e685. 显示页面格式窗口
Thepageformatdialogallowstheusertochangethedefaultpageformatvaluessuchastheorientationandpapersize.PrinterJobpjob=PrinterJob.getPrinterJob();//Getandchangedefau...
代码星球
·
2021-02-11
e685.
显示
页面
格式
窗口
e681. 基本的打印程序
Notethat(0,0)oftheGraphicsobjectisatthetop-leftoftheactualpage,outsidetheprintablearea.Inthisexample,theGraphicsobjectistranslatedsothat(0,0)becomesthetop-leftc...
代码星球
·
2021-02-11
e681.
基本
打印
程序
e674. 创建并绘制加速图像
Imagesinacceleratedmemoryaremuchfastertodrawonthescreen.Thisexampledemonstrateshowtotakeanimageandmakeanacceleratedcopyofitandthenuseittodrawonthescreen.Theprob...
代码星球
·
2021-02-11
e674.
创建
绘制
加速
图像
首页
上一页
1
2
3
4
5
...
下一页
尾页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他