blob: c8a201e96312afcdd591c8405d2e8a89f11acba2 [file] [log] [blame]
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
= GUI 构建器可视反馈图例
:jbake-type: tutorial
:jbake-tags: tutorials
:jbake-status: published
:icons: font
:syntax: true
:source-highlighter: pygments
:toc: left
:toc-title:
:description: GUI 构建器可视反馈图例 - Apache NetBeans
:keywords: Apache NetBeans, Tutorials, GUI 构建器可视反馈图例
本文档介绍 IDE GUI 构建器在处理 Java GUI 的创建期间提供的可视反馈(以前的代码名称为 Matisse)。
image::images/netbeans-stamp-80-74-73.png[title="此页上的内容适用于 NetBeans IDE 6.9 及更高版本"]
[quote]
----
== 对齐基准线
只有当添加或移动组件时,才会出现对齐基准线,此基准线指示当松开鼠标按钮时组件将对齐的首选位置。定位后,对齐基准线将被实线和锚点指示符所取代,实线阐明组件之间共享的公共对齐位置。
|===
|*插入量* |image::images/legend5.png[] |插入量是组件以及组件所在的容器之间的首选间距。插入量是通过水平和垂直基准虚线来指示的。
|*偏移* |image::images/legend30.png[] |偏移是相邻组件之间的首选间距。偏移是通过水平和垂直基准虚线来指示的。
|*基线* |image::images/legend13.png[] |基线对齐是包含显示文本的相邻组件之间的首选关系。基线对齐是通过水平基准虚线来指示的。
|*边*
|
image::images/legend12.png[]
image::images/legend14.png[]
image::images/legend32.png[]
image::images/legend33.png[]
|
边对齐(上、下、左、右)是相邻组件之间的可能的对齐关系。边对齐是通过水平和垂直基准虚线来指示的。
|*缩进* |image::images/legend31b.png[] |缩进对齐是一种特殊的对齐关系,其中一个组件位于另一个组件的下方并稍稍向右偏移。缩进对齐是通过两条垂直的基准虚线来指示的。
|*首选间距* |image::images/legend34.png[] |首选间距(小、中、大)是相邻组件之间的间隙大小。首选间距是通过水平或垂直基准虚线来指示的。
|===
<<top,返回页首>>
== 锚点指示符
在组件对齐到位后,会出现实心锚点指示符,阐明组件之间共享的公共对齐位置。
|===
|*容器* |image::images/legend50.png[] |将各个组件连接到它们所在的容器的锚点由小的半圆指示符表示,这些指示符具有从容器边缘延伸到组件本身的虚线。
|*组件* |image::images/legend51.png[] |将各个组件连接到相邻组件的锚点由小的半圆指示符表示,这些指示符具有从一个组件延伸到另一个组件的虚线。
|===
<<top,返回页首>>
== 大小调整指示符
|===
|*相同大小* |
image::images/legend28.png[]
image::images/legend29.png[]
|“相同大小”是一组组件(相邻或不相邻)均设置为具有相同宽度或高度的状态。“相同大小”由小的矩形指示符阐明,这些指示符显示在设置了该属性的每个组件的上边缘。
|*自动调整大小* |
image::images/legend42.png[]
image::images/legend41.png[]
image::images/legend43.png[]
|
“自动调整大小”是组件的宽度或高度设置为在运行时动态调整的状态。“自动调整大小”由 GUI 构建器工具栏中的水平调整大小按钮和垂直调整大小按钮(分别称为“更改水平大小可调性”和“更改垂直大小可调性”)的状态来指示。通过选择“属性”窗口的“其他属性”列表中的 ``可调整大小`` ,可以启用自动调整大小。
|===
<<top,返回页首>>
== 突出显示和控柄
|===
|*突出显示* |image::images/legend10.png[] |橙色突出显示指明了选定组件将要放置的位置。
|*控柄* |image::images/legend11.png[] |选择了组件时,该组件周围会显示小方形大小调整控柄。单击、按住并拖动组件边缘的控柄可以调整该组件的大小。
|===
<<top,返回页首>>
----
link:/about/contact_form.html?to=3&subject=Feedback:%20GUI%20Builder%20Visual%20Feedback%20Legend,%20NetBeans%20IDE[+发送有关此教程的反馈意见+]
== 另请参见
* _使用 NetBeans IDE 开发应用程序_中的link:http://www.oracle.com/pls/topic/lookup?ctx=nb8000&id=NBDAG920[+实现 Java GUI+]
* link:../../trails/matisse.html[+Java GUI 应用程序学习资源+]
* link:../../trails/java-se.html[+常规 Java 开发学习资源+]