コード例 #1
0
 @RunsInCurrentThread
 private static void validateCanClose(JInternalFrame internalFrame) {
   validateIsShowing(internalFrame);
   if (!internalFrame.isClosable())
     throw new IllegalStateException(
         concat("The JInternalFrame <", format(internalFrame), "> is not closable"));
 }
コード例 #2
0
 @RunsInCurrentThread
 private static void validateCanMaximize(JInternalFrame internalFrame) {
   validateIsShowingOrIconified(internalFrame);
   if (!internalFrame.isMaximizable())
     throw new IllegalStateException(
         concat("The JInternalFrame <", format(internalFrame), "> is not maximizable"));
 }
コード例 #3
0
 @RunsInCurrentThread
 private static Triple<Boolean, Container, Point> deiconifyInfo(JInternalFrame internalFrame) {
   boolean deiconified = !isIconified(internalFrame);
   if (deiconified) return new Triple<Boolean, Container, Point>(true, null, null);
   JDesktopIcon desktopIcon = internalFrame.getDesktopIcon();
   return new Triple<Boolean, Container, Point>(
       deiconified, desktopIcon, iconifyLocationOf(desktopIcon));
 }
コード例 #4
0
 @RunsInCurrentThread
 private static Pair<Boolean, Point> closeInfo(JInternalFrame internalFrame) {
   if (internalFrame.isClosed()) return new Pair<Boolean, Point>(true, null);
   return new Pair<Boolean, Point>(false, closeLocationOf(internalFrame));
 }
コード例 #5
0
 @RunsInCurrentThread
 private static Point findIconifyLocation(JInternalFrame internalFrame) {
   return iconifyLocationOf(internalFrame.getDesktopIcon());
 }
コード例 #6
0
 @RunsInCurrentThread
 private static Pair<Container, Point> findMaximizeLocation(JInternalFrame internalFrame) {
   Container clickTarget = internalFrame.isIcon() ? internalFrame.getDesktopIcon() : internalFrame;
   Point location = maximizeLocationOf(clickTarget);
   return new Pair<Container, Point>(clickTarget, location);
 }
コード例 #7
0
 @RunsInCurrentThread
 private static void validateIsShowingOrIconified(JInternalFrame internalFrame) {
   if (!internalFrame.isIcon()) validateIsShowing(internalFrame);
 }