当前位置: 首页>>代码示例>>Java>>正文


Java TextComponentPeer.setEditable方法代码示例

本文整理汇总了Java中java.awt.peer.TextComponentPeer.setEditable方法的典型用法代码示例。如果您正苦于以下问题:Java TextComponentPeer.setEditable方法的具体用法?Java TextComponentPeer.setEditable怎么用?Java TextComponentPeer.setEditable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.peer.TextComponentPeer的用法示例。


在下文中一共展示了TextComponentPeer.setEditable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setEditable

import java.awt.peer.TextComponentPeer; //导入方法依赖的package包/类
/**
 * Sets whether or not this component's text can be edited.
 *
 * @param editable <code>true</code> to enable editing of the text,
 * <code>false</code> to disable it.
 */
public synchronized void setEditable(boolean editable)
{
  this.editable = editable;

  TextComponentPeer tcp = (TextComponentPeer) getPeer();
  if (tcp != null)
    tcp.setEditable(editable);
}
 
开发者ID:vilie,项目名称:javify,代码行数:15,代码来源:TextComponent.java

示例2: setEditable

import java.awt.peer.TextComponentPeer; //导入方法依赖的package包/类
/**
 * Sets the flag that determines whether or not this
 * text component is editable.
 * <p>
 * If the flag is set to <code>true</code>, this text component
 * becomes user editable. If the flag is set to <code>false</code>,
 * the user cannot change the text of this text component.
 * By default, non-editable text components have a background color
 * of SystemColor.control.  This default can be overridden by
 * calling setBackground.
 *
 * @param     b   a flag indicating whether this text component
 *                      is user editable.
 * @see       java.awt.TextComponent#isEditable
 * @since     JDK1.0
 */
public synchronized void setEditable(boolean b) {
    if (editable == b) {
        return;
    }

    editable = b;
    TextComponentPeer peer = (TextComponentPeer)this.peer;
    if (peer != null) {
        peer.setEditable(b);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:TextComponent.java

示例3: setEditable

import java.awt.peer.TextComponentPeer; //导入方法依赖的package包/类
/**
 * Sets the flag that determines whether or not this
 * text component is editable.
 * <p>
 * If the flag is set to {@code true}, this text component
 * becomes user editable. If the flag is set to {@code false},
 * the user cannot change the text of this text component.
 * By default, non-editable text components have a background color
 * of SystemColor.control.  This default can be overridden by
 * calling setBackground.
 *
 * @param     b   a flag indicating whether this text component
 *                      is user editable.
 * @see       java.awt.TextComponent#isEditable
 * @since     1.0
 */
public synchronized void setEditable(boolean b) {
    if (editable == b) {
        return;
    }

    editable = b;
    TextComponentPeer peer = (TextComponentPeer)this.peer;
    if (peer != null) {
        peer.setEditable(b);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:28,代码来源:TextComponent.java

示例4: setEditable

import java.awt.peer.TextComponentPeer; //导入方法依赖的package包/类
/**
    * Sets the flag that determines whether or not this
    * text component is editable.
    * <p>
    * If the flag is set to <code>true</code>, this text component
    * becomes user editable. If the flag is set to <code>false</code>,
    * the user cannot change the text of this text component.
    * By default, non-editable text components have a background color
    * of SystemColor.control.  This default can be overridden by
    * calling setBackground.
    *
    * @param     b   a flag indicating whether this text component
    *                      is user editable.
    * @see       java.awt.TextComponent#isEditable
    * @since     JDK1.0
    */
   public synchronized void setEditable(boolean b) {
       if (editable == b) {
           return;
       }

editable = b;
TextComponentPeer peer = (TextComponentPeer)this.peer;
if (peer != null) {
    peer.setEditable(b);
}
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:28,代码来源:TextComponent.java


注:本文中的java.awt.peer.TextComponentPeer.setEditable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。