java类java.beans.Transient的实例源码

JList.java 文件源码 项目:OpenJSharp 阅读 27 收藏 0 点赞 0 评论 0
/**
 * 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;
}
JList.java 文件源码 项目:jdk8u-jdk 阅读 33 收藏 0 点赞 0 评论 0
/**
 * 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;
}
AssetInfo.java 文件源码 项目:asch-java 阅读 18 收藏 0 点赞 0 评论 0
@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;
}
ScrollPane.java 文件源码 项目:OpenJSharp 阅读 31 收藏 0 点赞 0 评论 0
/**
 * 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());
    }
}
ScrollPane.java 文件源码 项目:openjdk-jdk10 阅读 26 收藏 0 点赞 0 评论 0
/**
 * 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());
    }
}
JComponent.java 文件源码 项目:OpenJSharp 阅读 22 收藏 0 点赞 0 评论 0
/**
 * 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();
}
JComponent.java 文件源码 项目:OpenJSharp 阅读 28 收藏 0 点赞 0 评论 0
/**
 * 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();
}
Component.java 文件源码 项目:openjdk-jdk10 阅读 23 收藏 0 点赞 0 评论 0
/**
 * 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;
}
Component.java 文件源码 项目:jdk8u-jdk 阅读 28 收藏 0 点赞 0 评论 0
/**
 * 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;
}
JTabbedPane.java 文件源码 项目:jdk8u-jdk 阅读 24 收藏 0 点赞 0 评论 0
/**
 * 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);
}
JComponent.java 文件源码 项目:jdk8u-jdk 阅读 19 收藏 0 点赞 0 评论 0
/**
 * 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();
}
Test4935607.java 文件源码 项目:jdk8u-jdk 阅读 24 收藏 0 点赞 0 评论 0
@Override
@Transient(false)
public Object getProperty() {
    return this;
}
Test4935607.java 文件源码 项目:jdk8u-jdk 阅读 25 收藏 0 点赞 0 评论 0
@Override
@Transient
public Object getProperty() {
    return this;
}
MultiSignatureAssetInfo.java 文件源码 项目:asch-java 阅读 20 收藏 0 点赞 0 评论 0
@Transient
public List<String> getRemoveKeys() {
    return this.removeKeys;
}
Issue944.java 文件源码 项目:GitHub 阅读 18 收藏 0 点赞 0 评论 0
@Transient
public int getId() {
    return id;
}
PrintPreviewPanel.java 文件源码 项目:rapidminer 阅读 24 收藏 0 点赞 0 评论 0
@Override
@Transient
public Dimension getMinimumSize() {
    return getDimension();
}
PrintPreviewPanel.java 文件源码 项目:rapidminer 阅读 25 收藏 0 点赞 0 评论 0
@Override
@Transient
public Dimension getMaximumSize() {
    return getDimension();
}
PrintPreviewPanel.java 文件源码 项目:rapidminer 阅读 22 收藏 0 点赞 0 评论 0
@Override
@Transient
public Dimension getPreferredSize() {
    return getDimension();
}
Test4935607.java 文件源码 项目:openjdk-jdk10 阅读 19 收藏 0 点赞 0 评论 0
@Transient
public Object getProperty() {
    return this;
}
Test4935607.java 文件源码 项目:openjdk-jdk10 阅读 21 收藏 0 点赞 0 评论 0
@Override
@Transient(false)
public void addEventSetListener(EventSetListener listener) {
}
Test4935607.java 文件源码 项目:openjdk-jdk10 阅读 19 收藏 0 点赞 0 评论 0
@Override
@Transient
public void addEventSetListener(EventSetListener listener) {
}
Test4935607.java 文件源码 项目:jdk8u-jdk 阅读 24 收藏 0 点赞 0 评论 0
@Override
@Transient(false)
public void addEventSetListener(EventSetListener listener) {
}
Test4935607.java 文件源码 项目:openjdk-jdk10 阅读 23 收藏 0 点赞 0 评论 0
@Override
@Transient
public Object getProperty() {
    return this;
}
Test4935607.java 文件源码 项目:openjdk-jdk10 阅读 29 收藏 0 点赞 0 评论 0
@Override
@Transient(false)
public void setProperty(Object object) {
}
Test4935607.java 文件源码 项目:openjdk-jdk10 阅读 19 收藏 0 点赞 0 评论 0
@Transient
public String getComment() {
    return this.comment;
}
Test4935607.java 文件源码 项目:jdk8u-jdk 阅读 18 收藏 0 点赞 0 评论 0
@Override
@Transient
public void removeEventSetListener(EventSetListener listener) {
}
Test4935607.java 文件源码 项目:openjdk-jdk10 阅读 20 收藏 0 点赞 0 评论 0
@Override
@Transient
public void setProperty(Object object) {
}
DefaultListSelectionModel.java 文件源码 项目:OpenJSharp 阅读 22 收藏 0 点赞 0 评论 0
/** {@inheritDoc} */
@Transient
public int getAnchorSelectionIndex() {
    return anchorIndex;
}
AdvancedPropertyUtils.java 文件源码 项目:waggle-dance 阅读 25 收藏 0 点赞 0 评论 0
private boolean isTransient(PropertyDescriptor propertyDescriptor) {
  return propertyDescriptor.getReadMethod().getAnnotation(Transient.class) != null
      || propertyDescriptor.getWriteMethod().getAnnotation(Transient.class) != null;
}
Test4935607.java 文件源码 项目:jdk8u-jdk 阅读 17 收藏 0 点赞 0 评论 0
@Override
@Transient(false)
public void removeEventSetListener(EventSetListener listener) {
}


问题


面经


文章

微信
公众号

扫码关注公众号