Show the instruction list.
<p>
This is based on orientation so the different layouts (for portrait vs. landscape)
can be animated appropriately.
979323
public void showInstructionList() {
    onInstructionListVisibilityChanged(true);
    instructionLayout.requestFocus();
    beginDelayedListTransition();
    if (isLandscape()) {
      updateLandscapeConstraintsTo(R.layout.instruction_layout_alt);
    }
    instructionListLayout.setVisibility(VISIBLE);
  }
290880
static Set<Integer> findReturnsAndThrows(final List<Instruction> instructions) {
        return find(instruction -> instruction.getType() == Instruction.InstructionType.RETURN || instruction.getType() == Instruction.InstructionType.THROW, instructions);
    }
939563
private void printInstruction(String instruction) {
        System.out.println(StringUtils.repeat("-", instruction.length()));
        System.out.println(instruction);
        System.out.println(StringUtils.repeat("-", instruction.length()));
    }
1134021
private void align() {
        mainForm.setLayoutMargin(5);
        mainForm.setWidth100();
        mainForm.setHeight100();
        mainForm.setBackgroundColor("#FFFFFF");
        mainForm.setAlign(Alignment.CENTER);
        mainForm.setLayoutAlign(Alignment.CENTER);
        mainForm.setDefaultLayoutAlign(Alignment.CENTER);
        
        viewPort.setWidth(LAYOUT_WIDTH);
        viewPort.setLayoutAlign(Alignment.CENTER);
        viewPort.setAlign(Alignment.CENTER);
        viewPort.setDefaultLayoutAlign(Alignment.CENTER);
    }
635324
public static void showAlignmentImage(MultipleAlignment multAln,
			String result) {

		JFrame frame = new JFrame();

		String title = multAln.getEnsemble().getAlgorithmName() +
				" V."+multAln.getEnsemble().getVersion();
		frame.setTitle(title);
		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

		AlignmentTextPanel txtPanel = new AlignmentTextPanel();
		txtPanel.setText(result);

		JMenuBar menu = MenuCreator.getAlignmentTextMenu(
				frame,txtPanel,null,multAln);

		frame.setJMenuBar(menu);
		JScrollPane js = new JScrollPane();
		js.getViewport().add(txtPanel);
		js.getViewport().setBorder(null);

		frame.getContentPane().add(js);
		frame.pack();
		frame.setVisible(true);
	}
1027815
private void initializePortraitListListener() {
    instructionLayout.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View instructionView) {
        boolean instructionsVisible = instructionListLayout.getVisibility() == VISIBLE;
        if (!instructionsVisible) {
          showInstructionList();
        } else {
          hideInstructionList();
        }
      }
    });
  }
32046
public void buildInitialLayout(PageLayoutBuilder pageLayout) {
		for (Iterator iter = _viewDescriptors.iterator(); iter.hasNext();) {
			String viewDescriptorId = (String) iter.next();
			pageLayout.addView(viewDescriptorId); 
		}
	}
937041
private static void showAboutDialog(){

		JDialog dialog = new JDialog();

		dialog.setSize(new Dimension(300,300));

		String msg = "This viewer is based on <b>BioJava</b> and <b>Jmol</>. <br>Author: Andreas Prlic <br> ";
		msg += "Structure Alignment algorithm based on a variation of the PSC++ algorithm by Peter Lackner.";


		JEditorPane txt = new JEditorPane("text/html", msg);
		txt.setEditable(false);


		JScrollPane scroll = new JScrollPane(txt);

		Box vBox = Box.createVerticalBox();
		vBox.add(scroll);

		JButton close = new JButton("Close");

		close.addActionListener(new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent event) {
				Object source = event.getSource();

				JButton but = (JButton)source;
				Container parent = but.getParent().getParent().getParent().getParent().getParent().getParent() ;

				JDialog dia = (JDialog) parent;
				dia.dispose();
			}
		});

		Box hBoxb = Box.createHorizontalBox();
		hBoxb.add(Box.createGlue());
		hBoxb.add(close,BorderLayout.EAST);

		vBox.add(hBoxb);

		dialog.getContentPane().add(vBox);
		dialog.setVisible(true);


	}
699679
protected void initLayout()
  {
    setOpaque( false );
    setBorder( BorderFactory.createLineBorder( Scheme.active().getWindowBorder() ) );

    GridBagLayout gridBag = new GridBagLayout();
    JPanel pane = new JPanel();
    pane.addMouseListener( this );
    pane.addMouseMotionListener( this );
    pane.setLayout( gridBag );
    GridBagConstraints c = new GridBagConstraints();

    _viewer = new HtmlViewer();
    _viewer.setText( _strHelpText );
    _viewer.setBorder( BorderFactory.createEmptyBorder( 0, 10, 0, 10 ) );
    _viewer.addMouseListener( this );
    _viewer.addMouseMotionListener( this );
    _scroller = new JScrollPane( _viewer );
    _scroller.setBorder( BorderFactory.createEmptyBorder( 0, 0, 0, 0 ) );
    _scroller.setMaximumSize( calcMaximumViewerSize() );
    _viewer.setBackground( Scheme.active().getTooltipBackground() );

    c.anchor = GridBagConstraints.CENTER;
    c.fill = GridBagConstraints.BOTH;
    c.gridx = 0;
    c.gridy = 0;
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.gridheight = GridBagConstraints.REMAINDER;
    c.weightx = 1;
    c.weighty = 1;
    pane.add( _scroller, c );

    _editorKeyListener = new EditorKeyListener();

    add( pane );

    addSeparator();

    addMouseListener( this );
    addMouseMotionListener( this );
  }
1047395
private void showButtons() {
        if (!areButtonsShowing) {
            buttonContainer.clearAnimation();
            buttonContainer.startAnimation(slideUp);
            buttonContainer.setVisibility(View.VISIBLE);
            areButtonsShowing = true;
        }
    }
137493
private static void initLayout() {
		Log.info("Initializing Layout...");
		try {
			conf.getLayout().init();
			configContext.setLayout(conf.getLayout());
			Log.info(conf.getLayout().getClass().getName() + " Initialized.");
		} catch (InitializationException e) {
			Log.error("There is a problem in the layout: ", conf.getLayout().getClass().getName(), " you configured.",
					ErrorGuide.getGuide(ErrorGuide.LAYOUT_ERROR));
			terminate();
			throw new InitializationException(INIT_FAILED);
		}

	}
1230223
private void layout(Output dest) {
        Instruction instr;
        int instrSize, varSize;
        IntArrayList vars;  // indexes of instructions with variable length
        IntArrayList lens;  // lengths of var-len instructions
        int i, j, k, ofs;
        int shrink, len;
        boolean changes;

        instrSize = instructions.size();
        vars = new IntArrayList();
        lens = new IntArrayList();
        ofs = 0;
        for (i = 0; i < instrSize; i++) {
            instr = instructions.get(i);
            instr.ofs = ofs;
            len = instr.getMaxLength(dest);
            ofs += len;
            if (instr.type.isVariable()) {
                vars.add(i);
                lens.add(len);
            }
        }
        codeSize = ofs;
        varSize = vars.size();
        do {
            changes = false;
            shrink = 0;
            for (i = 0; i < varSize; i++) {
                j = vars.get(i);
                instr = instructions.get(j);
                len = instr.getVariableLength(this);
                if (len < lens.get(i)) {
                    changes = true;
                    shrink += (lens.get(i) - len);
                    lens.set(i, len);
                }
                if (shrink > 0) {
                    // relocate up to end or next var-instr
                    for (k = (i + 1 == varSize)? instrSize - 1 : vars.get(i + 1);  k > j; k--) {
                        instructions.get(k).ofs -= shrink;
                    }
                }
            }
            codeSize -= shrink;
        } while (changes);
    }
822713
private void init(){

        // Create the Empty Layout
        LinearLayout container = new LinearLayout(getContext());
        mIcon = new ImageView(getContext());
        mMessage = new TextView(getContext());
        mAction = new TextView(getContext());
        mProgress = new ProgressBar(getContext());

        // Setup the layout
        LayoutParams containerParams = new LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
        container.setGravity(Gravity.CENTER);
        container.setOrientation(LinearLayout.VERTICAL);
        containerParams.addRule(RelativeLayout.CENTER_IN_PARENT);

        // Setup the Icon
        if(mEmptyIcon > 0) {
            mIcon.setImageResource(mEmptyIcon);
        }else{
            mIcon.setVisibility(View.GONE);
        }

        mIcon.setPadding(0, 0, 0, mEmptyIconPadding);
        if (mEmptyIconColor != -1) {
            mIcon.setColorFilter(mEmptyIconColor, PorterDuff.Mode.SRC_IN);
        }
        int width = mEmptyIconSize == -1 ? WRAP_CONTENT : mEmptyIconSize;
        int height = mEmptyIconSize == -1 ? WRAP_CONTENT : mEmptyIconSize;
        LinearLayout.LayoutParams iconParams = new LinearLayout.LayoutParams(width, height);
        container.addView(mIcon, iconParams);

        // Setup the message
        LinearLayout.LayoutParams msgParams = new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
        mMessage.setGravity(Gravity.CENTER);
        mMessage.setTextSize(TypedValue.COMPLEX_UNIT_PX, mEmptyMessageTextSize);
        mMessage.setTextColor(mEmptyMessageColor);
        mMessage.setText(mEmptyMessage);

        // Add to the layout
        container.addView(mMessage, msgParams);

        // Setup the Action Label
        LinearLayout.LayoutParams actionParams = new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
        actionParams.topMargin = getResources().getDimensionPixelSize(R.dimen.activity_padding);
        int padding = (int) SizeUtils.dpToPx(getContext(), 8);
        mAction.setText(mEmptyActionText);
        mAction.setTextColor(mEmptyActionColor);
        mAction.setTextSize(TypedValue.COMPLEX_UNIT_PX, mEmptyActionTextSize);
        mAction.setAllCaps(true);
        mAction.setPadding(padding, padding, padding, padding);
        mAction.setVisibility(TextUtils.isEmpty(mEmptyActionText) ? View.GONE : View.VISIBLE);
        UIUtils.setBackground(mAction, UIUtils.getSelectableItemBackground(getContext()));
        mAction.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mActionClickListener != null) mActionClickListener.onClick(v);
            }
        });

        if(!isInEditMode()){
            FontLoader.apply(mMessage, mEmptyMessageTypeface);
            FontLoader.apply(mAction, Face.ROBOTO_MEDIUM);
        }

        container.addView(mAction, actionParams);

        LinearLayout.LayoutParams progressParams = new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
        mProgress.setVisibility(View.GONE);

        container.addView(mProgress, progressParams);

        // Add to view
        addView(container, containerParams);

        // Switch the states
        if(mState == STATE_LOADING){
            setLoading();
        }
    }
960563
public void showHint() {
    final int[] screenPos = new int[2];
    final Rect displayFrame = new Rect();
    getLocationOnScreen(screenPos);
    getWindowVisibleDisplayFrame(displayFrame);
    final Context context = getContext();
    final int width = getWidth();
    final int height = getHeight();
    final int midy = screenPos[1] + height / 2;
    int referenceX = screenPos[0] + width / 2;
    if (ViewCompat.getLayoutDirection(this) == ViewCompat.LAYOUT_DIRECTION_LTR) {
      final int screenWidth = context.getResources().getDisplayMetrics().widthPixels;
      referenceX = screenWidth - referenceX; // mirror
    }
    StringBuilder hint = new StringBuilder("#");
    if (Color.alpha(color) != 255) {
      hint.append(Integer.toHexString(color).toUpperCase(Locale.ENGLISH));
    } else {
      hint.append(String.format("%06X", 0xFFFFFF & color).toUpperCase(Locale.ENGLISH));
    }
    Toast cheatSheet = Toast.makeText(context, hint.toString(), Toast.LENGTH_SHORT);
    if (midy < displayFrame.height()) {
      // Show along the top; follow action buttons
      cheatSheet.setGravity(Gravity.TOP | GravityCompat.END, referenceX, screenPos[1] + height - displayFrame.top);
    } else {
      // Show along the bottom center
      cheatSheet.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, height);
    }
    cheatSheet.show();
  }
939847
private void init() {
        this.setLayout(new BorderLayout());

        // MAIN PANEL
        JPanel mainPanel = new JPanel();
        Border margin = new EmptyBorder(10, 10, 5, 10);

        mainPanel.setBorder(margin);
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));

        mainPanel.add(makeTitlePanel());
    }
1253379
private void initializeDrawer() {
    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_drawer,
        R.string.show, R.string.hide);
    mDrawerLayout.setDrawerListener(mDrawerToggle);
    getActionBar().setDisplayHomeAsUpEnabled(true);
    mDrawerToggle.syncState();
  }
367473
public void show() {
        if (isVisible()) {
            return;
        }

        resetToInitialState();

        setVisible(true);

        final Timeline phaseOne = new Timeline();
        phaseOne.getKeyFrames().addAll(
                new KeyFrame(Duration.ZERO, new KeyValue(transformRadius, fromRadius), new KeyValue(transformOpacity, 0)),
                new KeyFrame(new Duration(120), new KeyValue(transformRadius, parentSection.getNominalRadius()), new KeyValue(transformOpacity, 1))
        );

        final Timeline phaseTwo = new Timeline();
        phaseTwo.getKeyFrames().addAll(
                new KeyFrame(Duration.ZERO, new KeyValue(transformAngle, parentSection.getAngularAxisDeg())),
                new KeyFrame(new Duration(80), new KeyValue(transformAngle, angle))
        );

        phaseOne.setOnFinished(event -> phaseTwo.play());

        phaseTwo.setOnFinished(event -> setMouseTransparent(false));

        phaseOne.play();
    }