示例#1
0
        /// <summary>
        /// Constructs a Checkbox with the specified label, set to the
        /// specified state, and in the specified check box group.
        /// </summary>
        /// <param name="label">   a string label for this check box,
        ///                        or <code>null</code> for no label. </param>
        /// <param name="state">   the initial state of this check box. </param>
        /// <param name="group">   a check box group for this check box,
        ///                           or <code>null</code> for no group. </param>
        /// <exception cref="HeadlessException"> if
        ///     <code>GraphicsEnvironment.isHeadless</code>
        ///     returns <code>true</code> </exception>
        /// <seealso cref= java.awt.GraphicsEnvironment#isHeadless
        /// @since     JDK1.1 </seealso>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public Checkbox(String label, boolean state, CheckboxGroup group) throws HeadlessException
        public Checkbox(String label, bool state, CheckboxGroup group)
        {
            GraphicsEnvironment.CheckHeadless();
            this.Label_Renamed = label;
            this.State_Renamed = state;
            this.Group         = group;
            if (state && (group != null))
            {
                group.SelectedCheckbox = this;
            }
        }
示例#2
0
        /// <summary>
        /// Creates a check box with the specified label, in the specified
        /// check box group, and set to the specified state.
        /// </summary>
        /// <param name="label">   a string label for this check box,
        ///                        or <code>null</code> for no label. </param>
        /// <param name="group">   a check box group for this check box,
        ///                           or <code>null</code> for no group. </param>
        /// <param name="state">   the initial state of this check box. </param>
        /// <exception cref="HeadlessException"> if
        ///    <code>GraphicsEnvironment.isHeadless</code>
        ///    returns <code>true</code> </exception>
        /// <seealso cref= java.awt.GraphicsEnvironment#isHeadless
        /// @since     JDK1.1 </seealso>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public Checkbox(String label, CheckboxGroup group, boolean state) throws HeadlessException
        public Checkbox(String label, CheckboxGroup group, bool state) : this(label, state, group)
        {
        }