當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。