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


Java Transient类代码示例

本文整理汇总了Java中java.beans.Transient的典型用法代码示例。如果您正苦于以下问题:Java Transient类的具体用法?Java Transient怎么用?Java Transient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getSelectedIndices

import java.beans.Transient; //导入依赖的package包/类
/**
 * Returns an array of all of the selected indices, in increasing
 * order.
 *
 * @return all of the selected indices, in increasing order,
 *         or an empty array if nothing is selected
 * @see #removeSelectionInterval
 * @see #addListSelectionListener
 */
@Transient
public int[] getSelectedIndices() {
    ListSelectionModel sm = getSelectionModel();
    int iMin = sm.getMinSelectionIndex();
    int iMax = sm.getMaxSelectionIndex();

    if ((iMin < 0) || (iMax < 0)) {
        return new int[0];
    }

    int[] rvTmp = new int[1+ (iMax - iMin)];
    int n = 0;
    for(int i = iMin; i <= iMax; i++) {
        if (sm.isSelectedIndex(i)) {
            rvTmp[n++] = i;
        }
    }
    int[] rv = new int[n];
    System.arraycopy(rvTmp, 0, rv, 0, n);
    return rv;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:JList.java

示例2: assetBytes

import java.beans.Transient; //导入依赖的package包/类
@Transient
public byte[] assetBytes(){
    ByteBuffer buffer = ByteBuffer.allocate(MAX_BUFFER_SIZE)
            .order(ByteOrder.LITTLE_ENDIAN);

    addBytes(buffer);

    buffer.flip();
    byte[] result = new byte[buffer.remaining()];
    buffer.get(result);

    return result;
}
 
开发者ID:AschPlatform,项目名称:asch-java,代码行数:14,代码来源:AssetInfo.java

示例3: getScrollPosition

import java.beans.Transient; //导入依赖的package包/类
/**
 * Returns the current x,y position within the child which is displayed
 * at the 0,0 location of the scrolled panel's view port.
 * This is a convenience method which interfaces with the adjustable
 * objects which represent the state of the scrollbars.
 * @return the coordinate position for the current scroll position
 * @throws NullPointerException if the scrollpane does not contain
 *     a child
 */
@Transient
public Point getScrollPosition() {
    synchronized (getTreeLock()) {
        if (getComponentCount()==0) {
            throw new NullPointerException("child is null");
        }
        return new Point(hAdjustable.getValue(), vAdjustable.getValue());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:ScrollPane.java

示例4: getMaximumSize

import java.beans.Transient; //导入依赖的package包/类
/**
 * If the maximum size has been set to a non-<code>null</code> value
 * just returns it.  If the UI delegate's <code>getMaximumSize</code>
 * method returns a non-<code>null</code> value then return that;
 * otherwise defer to the component's layout manager.
 *
 * @return the value of the <code>maximumSize</code> property
 * @see #setMaximumSize
 * @see ComponentUI
 */
@Transient
public Dimension getMaximumSize() {
    if (isMaximumSizeSet()) {
        return super.getMaximumSize();
    }
    Dimension size = null;
    if (ui != null) {
        size = ui.getMaximumSize(this);
    }
    return (size != null) ? size : super.getMaximumSize();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:JComponent.java

示例5: getMinimumSize

import java.beans.Transient; //导入依赖的package包/类
/**
 * If the minimum size has been set to a non-<code>null</code> value
 * just returns it.  If the UI delegate's <code>getMinimumSize</code>
 * method returns a non-<code>null</code> value then return that; otherwise
 * defer to the component's layout manager.
 *
 * @return the value of the <code>minimumSize</code> property
 * @see #setMinimumSize
 * @see ComponentUI
 */
@Transient
public Dimension getMinimumSize() {
    if (isMinimumSizeSet()) {
        return super.getMinimumSize();
    }
    Dimension size = null;
    if (ui != null) {
        size = ui.getMinimumSize(this);
    }
    return (size != null) ? size : super.getMinimumSize();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:JComponent.java

示例6: getForeground

import java.beans.Transient; //导入依赖的package包/类
/**
 * Gets the foreground color of this component.
 * @return this component's foreground color; if this component does
 * not have a foreground color, the foreground color of its parent
 * is returned
 * @see #setForeground
 * @since 1.0
 */
@Transient
public Color getForeground() {
    Color foreground = this.foreground;
    if (foreground != null) {
        return foreground;
    }
    Container parent = this.parent;
    return (parent != null) ? parent.getForeground() : null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:Component.java

示例7: getBackground

import java.beans.Transient; //导入依赖的package包/类
/**
 * Gets the background color of this component.
 * @return this component's background color; if this component does
 *          not have a background color,
 *          the background color of its parent is returned
 * @see #setBackground
 * @since JDK1.0
 */
@Transient
public Color getBackground() {
    Color background = this.background;
    if (background != null) {
        return background;
    }
    Container parent = this.parent;
    return (parent != null) ? parent.getBackground() : null;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:18,代码来源:Component.java

示例8: getSelectedComponent

import java.beans.Transient; //导入依赖的package包/类
/**
 * Returns the currently selected component for this tabbedpane.
 * Returns <code>null</code> if there is no currently selected tab.
 *
 * @return the component corresponding to the selected tab
 * @see #setSelectedComponent
 */
@Transient
public Component getSelectedComponent() {
    int index = getSelectedIndex();
    if (index == -1) {
        return null;
    }
    return getComponentAt(index);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:16,代码来源:JTabbedPane.java

示例9: getProperty

import java.beans.Transient; //导入依赖的package包/类
@Override
@Transient(false)
public Object getProperty() {
    return this;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:6,代码来源:Test4935607.java

示例10: getRemoveKeys

import java.beans.Transient; //导入依赖的package包/类
@Transient
public List<String> getRemoveKeys() {
    return this.removeKeys;
}
 
开发者ID:AschPlatform,项目名称:asch-java,代码行数:5,代码来源:MultiSignatureAssetInfo.java

示例11: getId

import java.beans.Transient; //导入依赖的package包/类
@Transient
public int getId() {
    return id;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:Issue944.java

示例12: getMinimumSize

import java.beans.Transient; //导入依赖的package包/类
@Override
@Transient
public Dimension getMinimumSize() {
	return getDimension();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:6,代码来源:PrintPreviewPanel.java

示例13: getMaximumSize

import java.beans.Transient; //导入依赖的package包/类
@Override
@Transient
public Dimension getMaximumSize() {
	return getDimension();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:6,代码来源:PrintPreviewPanel.java

示例14: getPreferredSize

import java.beans.Transient; //导入依赖的package包/类
@Override
@Transient
public Dimension getPreferredSize() {
	return getDimension();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:6,代码来源:PrintPreviewPanel.java

示例15: getProperty

import java.beans.Transient; //导入依赖的package包/类
@Transient
public Object getProperty() {
    return this;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:Test4935607.java


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