本文整理汇总了Java中org.openide.windows.InputOutput.isClosed方法的典型用法代码示例。如果您正苦于以下问题:Java InputOutput.isClosed方法的具体用法?Java InputOutput.isClosed怎么用?Java InputOutput.isClosed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.windows.InputOutput
的用法示例。
在下文中一共展示了InputOutput.isClosed方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get
import org.openide.windows.InputOutput; //导入方法依赖的package包/类
public static CachedInputOutput get(InputOutput inputOutput) {
CachedInputOutput result = null;
synchronized (InputOutputCache.class) {
for (Iterator<Entry<InputOutput, CachedInputOutput>> it = AVAILABLE.entrySet().iterator(); it.hasNext();) {
Entry<InputOutput, CachedInputOutput> entry = it.next();
final InputOutput free = entry.getKey();
final CachedInputOutput data = entry.getValue();
if (free.isClosed()) {
it.remove();
continue;
}
if (free.equals(inputOutput)) {
result = data;
ACTIVE_DISPLAY_NAMES.add(result.getDisplayName());
it.remove();
}
LOGGER.log(Level.FINEST, "Pooled: {0}", data.getDisplayName());
}
}
return result;
}
示例2: getInputOutput
import org.openide.windows.InputOutput; //导入方法依赖的package包/类
public static InputOutputData getInputOutput(InputOutput inputOutput) {
InputOutputData result = null;
synchronized (InputOutputManager.class) {
for (Iterator<Entry<InputOutput, InputOutputData>> it = AVAILABLE.entrySet().iterator(); it.hasNext();) {
Entry<InputOutput, InputOutputData> entry = it.next();
final InputOutput free = entry.getKey();
final InputOutputData data = entry.getValue();
if (free.isClosed()) {
it.remove();
continue;
}
if (free.equals(inputOutput)) {
result = data;
ACTIVE_DISPLAY_NAMES.add(result.displayName);
it.remove();
}
LOGGER.log(Level.FINEST, "InputOutputManager pool: {0}", data.getDisplayName());
}
}
return result;
}
示例3: getInputOutput
import org.openide.windows.InputOutput; //导入方法依赖的package包/类
private static CachedInputOutput getInputOutput(String name, List<Action> actions) {
CachedInputOutput result = null;
TreeSet<CachedInputOutput> candidates = new TreeSet<>(CachedInputOutput.DISPLAY_NAME_COMPARATOR);
synchronized (InputOutputCache.class) {
for (Iterator<Entry<InputOutput, CachedInputOutput>> it = AVAILABLE.entrySet().iterator(); it.hasNext();) {
Entry<InputOutput, CachedInputOutput> entry = it.next();
final InputOutput free = entry.getKey();
final CachedInputOutput data = entry.getValue();
if (free.isClosed()) {
it.remove();
continue;
}
if (isAppropriateName(name, data.getDisplayName())) {
List<Action> candidateActions = data.getActions();
if (candidateActions.isEmpty() && (actions == null || actions.isEmpty())) {
candidates.add(data);
} else if (actions != null && candidateActions.size() == actions.size()) {
boolean differs = false;
for (int i = 0; i < candidateActions.size(); i++) {
if (candidateActions.get(i).getClass() != actions.get(i).getClass()) {
differs = true;
break;
}
}
if (!differs) {
candidates.add(data);
}
} // continue to remove all closed tabs
}
LOGGER.log(Level.FINEST, "Pooled: {0}", data.getDisplayName());
}
if (!candidates.isEmpty()) {
result = candidates.first();
AVAILABLE.remove(result.getInputOutput());
ACTIVE_DISPLAY_NAMES.add(result.getDisplayName());
}
}
return result;
}
示例4: isIOClosed
import org.openide.windows.InputOutput; //导入方法依赖的package包/类
@Override
public boolean isIOClosed(InputOutput io) {
return io.isClosed();
}