_logTableScrollPane.getVerticalScrollBar().addAdjustmentListener( new TrackingAdjustmentListener() );
vertical.addAdjustmentListener(new AdjustmentListener()
final JScrollBar verticalScrollbar = scrollPane.getVerticalScrollBar(); if (verticalScrollbar != null) { verticalScrollbar.addAdjustmentListener(new AdjustmentListener() { @Override public void adjustmentValueChanged(AdjustmentEvent e) {
if(popupScrollBar == null) { popupScrollBar = new JScrollBar(JScrollBar.VERTICAL); popupScrollBar.addAdjustmentListener(new AdjustmentListener() { @Override public void adjustmentValueChanged(AdjustmentEvent e) { doLayout();
/** * Creates a new {@code ScrollingSwingTerminal} with customizable settings. * @param deviceConfiguration How to configure the terminal virtual device * @param fontConfiguration What kind of fonts to use * @param colorConfiguration Which color schema to use for ANSI colors */ @SuppressWarnings({"SameParameterValue", "WeakerAccess"}) public ScrollingSwingTerminal( TerminalEmulatorDeviceConfiguration deviceConfiguration, SwingTerminalFontConfiguration fontConfiguration, TerminalEmulatorColorConfiguration colorConfiguration) { this.scrollBar = new JScrollBar(JScrollBar.VERTICAL); this.swingTerminal = new SwingTerminal( deviceConfiguration, fontConfiguration, colorConfiguration, new ScrollController()); setLayout(new BorderLayout()); add(swingTerminal, BorderLayout.CENTER); add(scrollBar, BorderLayout.EAST); this.scrollBar.setMinimum(0); this.scrollBar.setMaximum(20); this.scrollBar.setValue(0); this.scrollBar.setVisibleAmount(20); this.scrollBar.addAdjustmentListener(new ScrollbarListener()); this.scrollModelUpdateBySystem = false; }
_logTableScrollPane.getVerticalScrollBar().addAdjustmentListener( new TrackingAdjustmentListener() );
scroller.scrollPane.getVerticalScrollBar().addAdjustmentListener(singleItemScroll);
scroller.scrollPane.getVerticalScrollBar().addAdjustmentListener(singleItemScroll); scroller.scrollPane.getHorizontalScrollBar().addAdjustmentListener(singleItemScroll);
private void hookScrollBarValueChange() { scrollBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(final AdjustmentEvent e) { SwingUtilities.invokeLater(new Runnable() { public void run() { treeTable.setTreeCellOffsetX(e.getValue()); if (!e.getValueIsAdjusting()) updateScrollBar(false); } }); } }); }
scrollerNetwork.scrollPane.getVerticalScrollBar().addAdjustmentListener(singleItemScroll); scrollerNetwork.scrollPane.getHorizontalScrollBar().addAdjustmentListener(singleItemScroll);
public LogViewTableWithUMLSynchronizer(JTable table2, UMLModel umlModel) { this.table = table2; this.umlModel = umlModel; logUmlMapper = umlModel.getLogUmlMapper(); table.getSelectionModel().addListSelectionListener(this); JScrollPane sp = umlModel.getScrollPane(); JScrollBar sb = sp.getVerticalScrollBar(); sb.addAdjustmentListener(this); umlModel.getScrollPane().getVerticalScrollBar().addAdjustmentListener(this); }
/** * Sets the scrollpane used for this JTextPane. Should be possible to do * this more elegantly. * * @param scroll */ public void setScrollPane(JScrollPane scroll) { scrollManager.setScrollPane(scroll); scroll.getVerticalScrollBar().addAdjustmentListener(e -> { linkController.updatePopup(); }); }
private void addAutoScrollScrollbarAdjustmentListener() { JScrollPane scrollPane = getEnclosingScrollPane(); if (scrollPane != null && autoScrollScrollbarAdjustmentListener == null) { autoScrollScrollbarAdjustmentListener = new StickyScrollbarAdjustmentListener(); scrollPane.getVerticalScrollBar().addAdjustmentListener(autoScrollScrollbarAdjustmentListener); } }
public Scroller(final UIFrame uiFrame) { this.uiFrame = uiFrame; scrollBar = this.uiFrame.getContentScrollPane().getVerticalScrollBar(); scrollBar.addComponentListener(this); scrollBar.addAdjustmentListener(this); }
public LogConsole(String defaultText) { this.defaultText = defaultText; setLayout(new BorderLayout()); add(container, BorderLayout.CENTER); console.setEditable(false); console.getCaret().setBlinkRate(0); container.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); container.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); container.getVerticalScrollBar().addAdjustmentListener(this); singleton = this; }
public LogConsole(String defaultText) { this.defaultText = defaultText; setLayout(new BorderLayout()); add(container, BorderLayout.CENTER); console.setEditable(false); console.getCaret().setBlinkRate(0); container.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); container.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); container.getVerticalScrollBar().addAdjustmentListener(this); singleton = this; }
public LogConsole(String defaultText) { this.defaultText = defaultText; setLayout(new BorderLayout()); add(container, BorderLayout.CENTER); console.setEditable(false); console.getCaret().setBlinkRate(0); container.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); container.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); container.getVerticalScrollBar().addAdjustmentListener(this); singleton = this; }
ScrollBarSync(HexViewer viewer, JScrollBar scrollBar) { this.viewer = viewer; this.scrollBar = scrollBar; scrollBar.setMinimum(0); scrollBar.setMaximum(MAXIMUM); scrollBar.addAdjustmentListener(new AdjustmentListener() { @Override public void adjustmentValueChanged(AdjustmentEvent event) { updatePositionFromScrollBar(); } }); }
/** * Set the document displayed in this NaviView. * @param document the document to be displayed - cannot be null. */ public void setDocument(Document document) { scrollBar.removeAdjustmentListener(this); this.document = document; editorPane.setDocument(document); scrollBar.addAdjustmentListener(this); documentChangedLength(); }
@Override protected void installListeners() { initRegularThumbAnimator(); initMacScrollbarAnimators(); super.installListeners(); scrollbar.addAdjustmentListener(myAdjustmentListener); scrollbar.addMouseListener(myMouseListener); scrollbar.addMouseMotionListener(myMouseMotionListener); scrollbar.addHierarchyListener(myHierarchyListener); updateGlobalListeners(false); restart(); }