本文整理汇总了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;
}
示例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;
}
示例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());
}
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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);
}
示例9: getProperty
import java.beans.Transient; //导入依赖的package包/类
@Override
@Transient(false)
public Object getProperty() {
return this;
}
示例10: getRemoveKeys
import java.beans.Transient; //导入依赖的package包/类
@Transient
public List<String> getRemoveKeys() {
return this.removeKeys;
}
示例11: getId
import java.beans.Transient; //导入依赖的package包/类
@Transient
public int getId() {
return id;
}
示例12: getMinimumSize
import java.beans.Transient; //导入依赖的package包/类
@Override
@Transient
public Dimension getMinimumSize() {
return getDimension();
}
示例13: getMaximumSize
import java.beans.Transient; //导入依赖的package包/类
@Override
@Transient
public Dimension getMaximumSize() {
return getDimension();
}
示例14: getPreferredSize
import java.beans.Transient; //导入依赖的package包/类
@Override
@Transient
public Dimension getPreferredSize() {
return getDimension();
}
示例15: getProperty
import java.beans.Transient; //导入依赖的package包/类
@Transient
public Object getProperty() {
return this;
}